title: A member function of an object, is returning NoneType, even when it is actually returning -1
body: <p>I have a class with a method called <code>__parse_asup_file_for_lrepl_client_time_stats(self,start,end)</code></p>
  
  <p>The method just searches in one log file between 2 strings, and returns the information read. However if the start and end strings are not found in the file, I do return a -1 (because the file does not contain the required information)</p>
  
  <pre><code>def __parse_asup_file_for_lrepl_client_time_stats(self,start,end):
     if(found_start and found_end):
          ...
          ...
     else: 
         _log.warning("There is no info, I am returning -1")
         return -1
  </code></pre>
  
  <p>I call the method this way:</p>
  
  <pre><code>r=dd.parse_asup_file_for_replication_contexts_info() 
  print ("R value is:",r)
  print("Type of R is",type(r))
  </code></pre>
  
  <p>My problem is that when executing the code, even when I do see the message "There is no info, I am returning -1", the value of R is <code>None</code> and the type is <code>NoneType</code></p>
  
  <pre><code>WARNING  There is no info, I am returning -1
  R value is: None
  Type of R is &lt;class 'NoneType'&gt;
  </code></pre>
  
  <p>For me clearly this is not a function without any return. The message "There is no info, I am returning -1" is displayed, so the return is returning -1</p>
  
  <p>Why r is NoneType?</p>