mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-19 21:03:14 -07:00
fixed indent and bracket
This commit is contained in:
parent
8aabce583e
commit
a511f9d2d7
1 changed files with 6 additions and 6 deletions
|
@ -164,11 +164,11 @@ elif packed == 1: ## unpack
|
||||||
|
|
||||||
## Create destination folder
|
## Create destination folder
|
||||||
if not os.path.exists(destination):
|
if not os.path.exists(destination):
|
||||||
try:
|
try:
|
||||||
os.makedirs(destination)
|
os.makedirs(destination)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
print("ERROR: Not possible to create destination folder: %s", e)
|
print("ERROR: Not possible to create destination folder: %s", e)
|
||||||
return
|
return
|
||||||
|
|
||||||
print("INFO: Extracting to %s", destination)
|
print("INFO: Extracting to %s", destination)
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ for dirpath, dirnames, filenames in os.walk(destination): #flatten out the direc
|
||||||
continue #no need to try and move files in the root destination directory.
|
continue #no need to try and move files in the root destination directory.
|
||||||
for filename in filenames:
|
for filename in filenames:
|
||||||
try:
|
try:
|
||||||
shutil.move(os.path.join(dirpath, filename), destination))
|
shutil.move(os.path.join(dirpath, filename), destination)
|
||||||
except OSError:
|
except OSError:
|
||||||
print ("INFO: Could not flatten %s ", os.path.join(dirpath, filename))
|
print ("INFO: Could not flatten %s ", os.path.join(dirpath, filename))
|
||||||
removeEmptyFolders(destination) #cleanup empty directories.
|
removeEmptyFolders(destination) #cleanup empty directories.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue