mirror of
https://github.com/iluvcapra/mfbatch.git
synced 2025-12-31 00:40:52 +00:00
autopep
This commit is contained in:
@@ -114,7 +114,7 @@ class CommandEnv:
|
||||
del self.metadatums['_ABSPATH']
|
||||
del self.metadatums['_FILENAME']
|
||||
del self.metadatums['_FOLDER']
|
||||
|
||||
|
||||
if '_NEW_BASENAME' in self.metadatums:
|
||||
del self.metadatums['_NEW_BASENAME']
|
||||
|
||||
@@ -198,7 +198,7 @@ they appear in the batchfile.
|
||||
def _write_metadata_and_rename_impl(self, line):
|
||||
if self.dry_run:
|
||||
print("DRY RUN would write metadata here.", file=self.outstream)
|
||||
|
||||
|
||||
if '_NEW_BASENAME' in self.env.metadatums:
|
||||
self.outstream.write('DRY RUN would rename file here.\n')
|
||||
else:
|
||||
@@ -210,7 +210,7 @@ they appear in the batchfile.
|
||||
self.outstream.write("Attempting to rename... ")
|
||||
full_old_path = os.path.abspath(line)
|
||||
new_name = os.path.join(os.path.dirname(full_old_path),
|
||||
self.env.metadatums['_NEW_BASENAME'])
|
||||
self.env.metadatums['_NEW_BASENAME'])
|
||||
|
||||
if not os.path.exists(new_name):
|
||||
os.rename(line, new_name)
|
||||
@@ -366,7 +366,6 @@ they appear in the batchfile.
|
||||
val = args[0]
|
||||
self.env.set_once('DESCRIPTION', val)
|
||||
|
||||
|
||||
# def picture(self, args):
|
||||
# """
|
||||
# picture PATH
|
||||
|
||||
Reference in New Issue
Block a user