Changeset 11624 in genesis for tools


Ignore:
Timestamp:
Nov 22, 2012, 7:16:11 AM (12 years ago)
Author:
rick
Message:

Cleared locked race-condition on HTTP error output, caused by a ValueError as the repos is locked and cannot svn info be processed.

Related-To: beheer#275

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gformat.py

    r11579 r11624  
    180180    if add_version_info:
    181181      p = subprocess.Popen(['svn', 'info', datadump['autogen_gfile']], stderr=subprocess.STDOUT, stdout=subprocess.PIPE)
    182       for line in p.communicate()[0].split('\n'):
    183         if line:
    184           (key, value) = line.split(': ')
    185           datadump["autogen_" + key.lower().replace(' ','_')] = value
     182      lines = p.communicate()[0].split('\n')
     183      if p.returncode == 0:
     184        for line in lines:
     185          if line:
     186            (key, value) = line.split(': ')
     187            datadump["autogen_" + key.lower().replace(' ','_')] = value
    186188
    187189    # Preformat certain needed variables for formatting and push those into special object
Note: See TracChangeset for help on using the changeset viewer.