mirror of
https://github.com/nikdoof/tvorganise.git
synced 2025-12-13 06:42:16 +00:00
PEP8 work, cleanup
This commit is contained in:
@@ -8,12 +8,15 @@ filenames and automatically copies them to
|
||||
the location format defined in the configuration file.
|
||||
"""
|
||||
|
||||
import os, sys, re
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
from optparse import OptionParser
|
||||
import shutil
|
||||
import ConfigParser
|
||||
import logging
|
||||
|
||||
|
||||
class TvOrganiser():
|
||||
|
||||
_config = {}
|
||||
@@ -58,7 +61,6 @@ class TvOrganiser():
|
||||
self._config = config
|
||||
return config
|
||||
|
||||
|
||||
def _findFiles(self, args):
|
||||
"""
|
||||
Takes a list of files/folders, grabs files inside them. Does not recurse
|
||||
@@ -108,8 +110,7 @@ class TvOrganiser():
|
||||
'epno': epno,
|
||||
'filepath': filepath,
|
||||
'filename': filename,
|
||||
'ext':ext
|
||||
})
|
||||
'ext': ext})
|
||||
break # Matched - to the next file!
|
||||
else:
|
||||
self._logger.warning("Invalid name: %s" % (f))
|
||||
@@ -136,7 +137,6 @@ class TvOrganiser():
|
||||
action = "store_true", default = False,
|
||||
help = "Verbose output")
|
||||
|
||||
|
||||
opts, args = parser.parse_args()
|
||||
|
||||
if os.path.exists(opts.config):
|
||||
@@ -160,7 +160,6 @@ class TvOrganiser():
|
||||
|
||||
self._logger.info("Old path:", oldfile)
|
||||
self._logger.info("New path:", newfile)
|
||||
ans= "always"
|
||||
|
||||
if opts.always:
|
||||
if not os.path.exists(newpath):
|
||||
|
||||
Reference in New Issue
Block a user