mirror of
https://github.com/josegonzalez/python-github-backup.git
synced 2025-12-05 08:08:02 +01:00
Merge pull request #142 from einsteinx2/issue/141-import-error-version
Fixed script fails if not installed from pip
This commit is contained in:
@@ -41,7 +41,11 @@ except ImportError:
|
||||
from urllib2 import HTTPRedirectHandler
|
||||
from urllib2 import build_opener
|
||||
|
||||
from github_backup import __version__
|
||||
try:
|
||||
from github_backup import __version__
|
||||
VERSION = __version__
|
||||
except ImportError:
|
||||
VERSION = 'unknown'
|
||||
|
||||
FNULL = open(os.devnull, 'w')
|
||||
|
||||
@@ -302,7 +306,7 @@ def parse_args():
|
||||
help='Clone repositories using SSH instead of HTTPS')
|
||||
parser.add_argument('-v', '--version',
|
||||
action='version',
|
||||
version='%(prog)s ' + __version__)
|
||||
version='%(prog)s ' + VERSION)
|
||||
parser.add_argument('--keychain-name',
|
||||
dest='osx_keychain_item_name',
|
||||
help='OSX ONLY: name field of password item in OSX keychain that holds the personal access or OAuth token')
|
||||
|
||||
Reference in New Issue
Block a user