support py2 and 3
This commit is contained in:
parent
b6412c116d
commit
a6a35e18d4
6 changed files with 24 additions and 19 deletions
|
|
@ -2,6 +2,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vi:si:et:sw=4:sts=4:ts=4
|
||||
# GPL 2012
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
|
@ -27,11 +28,11 @@ if __name__ == '__main__':
|
|||
(opts, args) = parser.parse_args()
|
||||
|
||||
if opts.version:
|
||||
print "%s %s" % (os.path.basename(sys.argv[0]), pandora_client.__version__)
|
||||
print("%s %s" % (os.path.basename(sys.argv[0]), pandora_client.__version__))
|
||||
sys.exit(0)
|
||||
opts.config = os.path.expanduser(opts.config)
|
||||
if (args and args[0] not in ('config', 'client') and not os.path.exists(opts.config)):
|
||||
print 'no configuration found, run "%s config" or specify one with -c' % sys.argv[0]
|
||||
print('no configuration found, run "%s config" or specify one with -c' % sys.argv[0])
|
||||
sys.exit(1)
|
||||
|
||||
if None in (opts.config, ):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue