Fixed logger lines

This commit is contained in:
2010-01-29 08:40:58 +00:00
parent f7a79851a1
commit 0106d75d25

View File

@@ -123,11 +123,11 @@ class TvOrganiser():
seasno, epno = int(seasno), int(epno)
self._logger.debug("File:", filename)
self._logger.debug("Pattern:", regex.pattern)
self._logger.debug("Showname:", showname)
self._logger.debug("Seas:", seasno)
self._logger.debug("Ep:", epno)
self._logger.debug("File: %s" % filename)
self._logger.debug("Pattern: %s" % regex.pattern)
self._logger.debug("Showname: %s" % showname)
self._logger.debug("Seas: %s" % seasno)
self._logger.debug("Ep: %s" % epno)
episodelist.append({'showname': showname,
'seasonnum': seasno,
@@ -185,8 +185,8 @@ class TvOrganiser():
newpath = config['target_path'] % name
newfile = os.path.join(newpath, filename)
self._logger.info("Old path:", oldfile)
self._logger.info("New path:", newfile)
self._logger.info("Old path: %s" % oldfile)
self._logger.info("New path: %s" % newfile)
if opts.always:
if not os.path.exists(newpath):
@@ -199,13 +199,13 @@ class TvOrganiser():
try:
os.rename(oldfile, newfile)
except OSError, errormsg:
self._logger.error("Error moving file! %s" % (errormsg))
self._logger.error("Error moving file! %s" % errormsg)
else:
self._logger.info("Copying file")
try:
shutil.copy(oldfile, newfile)
except IOError, errormsg:
self._logger.error("Error copying file! %s" % (errormsg))
self._logger.error("Error copying file! %s" % errormsg)
else:
self._logger.info("done")
else: