mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 11:14:02 +02:00
Space after usage text block and pep8 compliance
This commit is contained in:
parent
d9acb3091b
commit
c6a529613b
1 changed files with 8 additions and 4 deletions
|
|
@ -88,7 +88,7 @@ def __init__(self,
|
|||
if epilog is None:
|
||||
epilog = _('Created by ')+colored(__author__, fg='cyan')
|
||||
usage += '\n\n'+_('''Whenever you pass arguments to %prog that have spaces in them, '''
|
||||
'''enclose the arguments in quotation marks.''')
|
||||
'''enclose the arguments in quotation marks.''')+'\n'
|
||||
_OptionParser.__init__(self, usage=usage, version=version, epilog=epilog,
|
||||
formatter=CustomHelpFormatter(),
|
||||
conflict_handler=conflict_handler, **kwds)
|
||||
|
|
@ -171,7 +171,7 @@ def merge_options(self, lower, upper):
|
|||
non default values in lower.
|
||||
'''
|
||||
for dest in lower.__dict__.keys():
|
||||
if not upper.__dict__.has_key(dest):
|
||||
if not dest in upper.__dict__:
|
||||
continue
|
||||
opt = self.option_by_dest(dest)
|
||||
if lower.__dict__[dest] != opt.default and \
|
||||
|
|
@ -319,12 +319,16 @@ def set(self, key, val):
|
|||
self.__setitem__(key, val)
|
||||
|
||||
def __delitem__(self, key):
|
||||
if dict.has_key(self, key):
|
||||
try:
|
||||
dict.__delitem__(self, key)
|
||||
except KeyError:
|
||||
pass # ignore missing keys
|
||||
else:
|
||||
self.commit()
|
||||
|
||||
def commit(self):
|
||||
if self.no_commit: return
|
||||
if self.no_commit:
|
||||
return
|
||||
if hasattr(self, 'file_path') and self.file_path:
|
||||
dpath = os.path.dirname(self.file_path)
|
||||
if not os.path.exists(dpath):
|
||||
|
|
|
|||
Loading…
Reference in a new issue