Changeset 4516


Ignore:
Timestamp:
May 30, 2007, 5:51:05 AM (17 years ago)
Author:
ole
Message:

Better error message if version number cannot be obtained

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/abstract_2d_finite_volumes/util.py

    r4512 r4516  
    561561        from anuga.stored_version_info import version_info
    562562    except:
    563        
     563        msg = 'No version info stored and command "svn" is not '
     564        msg += 'recognised on the system PATH.\n\n'
     565        msg += 'If ANUGA has been installed from a distribution e.g. as '
     566        msg += 'obtained from SourceForge\n'
     567        msg += 'the version info should be '
     568        msg += 'available in the automatically generated file '
     569        msg += 'stored_version_info.py\n'
     570        msg += 'in the anuga root directory.\n'
     571        msg += 'If ANUGA is run from a Subversion sandpit, '
     572        msg += 'the version info should '
     573        msg += 'be obtained by using the command: "svn info".\n'
     574        msg += 'However, if svn is not available on the system path, ANUGA '
     575        msg += 'will be unable to use that command.\n'
     576        msg += 'In this case, make sure svn is accessible on your system. '
     577        msg += 'simply aliasing svn to the binary will not work. '
     578        msg += 'Good luck!'
     579
    564580        # No file available - try using Subversion
    565581        try:
     
    572588            else:
    573589                fid = os.popen('svn info 2>/dev/null')
     590       
    574591        except:
    575             msg = 'No version info stored and command "svn" is not '
    576             msg += 'recognised on the system PATH. What do you want me to do?'
    577592            raise Exception(msg)
    578593        else:
    579594            #print 'Got version from svn'           
    580595            version_info = fid.read()
    581         #import sys; sys.exit()
     596           
     597            if version_info == '':
     598                raise Exception(msg)   
    582599    else:
    583600        pass
Note: See TracChangeset for help on using the changeset viewer.