~nimit-svnit/gtg/self-subtask-update

« back to all changes in this revision

Viewing changes to GTG/tools/import_liblarch.py

  • Committer: Luca Invernizzi
  • Date: 2012-04-23 04:16:49 UTC
  • Revision ID: invernizzi.l@gmail.com-20120423041649-4hbj9fm4lbwhqhj0
Detects a stale liblarch copy in the import path

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
        return False
66
66
 
67
67
    import liblarch
68
 
    if not liblarch.is_compatible(REQUIRED_LIBLARCH_API):
 
68
    try:
 
69
        is_liblarch_compatible = liblarch.is_compatible(REQUIRED_LIBLARCH_API)
 
70
    except:
 
71
        print """I could not recognize your liblarch module. Make sure that
 
72
you don't have stale copies of liblarch in your import path
 
73
"""
 
74
        is_liblarch_compatible = False
 
75
    if not is_liblarch_compatible:
69
76
        print """Your liblarch copy has its API at version %s
70
77
but your GTG copy need liblarch API version %s
71
78
You may fix that by downloading the last version of liblarch with