mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 19:22:45 +01:00
Allow no registry file to be specified.
This commit is contained in:
parent
6ca78924f3
commit
81339b68b6
@ -113,16 +113,20 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
(options, args) = parser.parse_args()
|
(options, args) = parser.parse_args()
|
||||||
|
|
||||||
if not args or len(args) > 1:
|
if len(args) > 1:
|
||||||
parser.error()
|
parser.error()
|
||||||
|
elif not args:
|
||||||
registryFilename = args.pop()
|
print 'No registry file given; starting with a clean slate.'
|
||||||
try:
|
print 'Output registry will be written to registry.conf.'
|
||||||
registry.open(registryFilename)
|
registryFilename = 'registry.conf'
|
||||||
except registry.InvalidRegistryFile, e:
|
else:
|
||||||
sys.stderr.write(str(e))
|
registryFilename = args.pop()
|
||||||
sys.stderr.write('\n')
|
try:
|
||||||
sys.exit(-1)
|
registry.open(registryFilename)
|
||||||
|
except registry.InvalidRegistryFile, e:
|
||||||
|
sys.stderr.write(str(e))
|
||||||
|
sys.stderr.write('\n')
|
||||||
|
sys.exit(-1)
|
||||||
|
|
||||||
import log
|
import log
|
||||||
import conf
|
import conf
|
||||||
|
Loading…
Reference in New Issue
Block a user