mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 05:43:16 -07:00
PEP8: Fix formatting
* Remove redundant backslash between brackets * Fix multiple statements on one line * Fix missing/excess whitespace * Fix comments not starting with a single # and a space * Convert tabs to spaces * Use triple-quoted docstring
This commit is contained in:
parent
81ffe0456d
commit
8cd0e76ef8
35 changed files with 1342 additions and 947 deletions
|
@ -30,6 +30,7 @@ if os.name == 'nt':
|
|||
info = subprocess.STARTUPINFO()
|
||||
info.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
||||
|
||||
|
||||
# Prevent spaces from messing with us!
|
||||
def _escape_param(param):
|
||||
return '"%s"' % param
|
||||
|
@ -45,9 +46,9 @@ def _link_windows(src, dest):
|
|||
|
||||
raise IOError(err.output.decode('utf-8'))
|
||||
|
||||
# TODO, find out what kind of messages Windows sends us from mklink
|
||||
# print(stdout)
|
||||
# assume if they ret-coded 0 we're good
|
||||
# TODO, find out what kind of messages Windows sends us from mklink
|
||||
# print(stdout)
|
||||
# assume if they ret-coded 0 we're good
|
||||
|
||||
|
||||
def _symlink_windows(src, dest):
|
||||
|
@ -58,9 +59,10 @@ def _symlink_windows(src, dest):
|
|||
except CalledProcessError as err:
|
||||
raise IOError(err.output.decode('utf-8'))
|
||||
|
||||
# TODO, find out what kind of messages Windows sends us from mklink
|
||||
# print(stdout)
|
||||
# assume if they ret-coded 0 we're good
|
||||
# TODO, find out what kind of messages Windows sends us from mklink
|
||||
# print(stdout)
|
||||
# assume if they ret-coded 0 we're good
|
||||
|
||||
|
||||
def _dirlink_windows(src, dest):
|
||||
try:
|
||||
|
@ -70,9 +72,10 @@ def _dirlink_windows(src, dest):
|
|||
except CalledProcessError as err:
|
||||
raise IOError(err.output.decode('utf-8'))
|
||||
|
||||
# TODO, find out what kind of messages Windows sends us from mklink
|
||||
# print(stdout)
|
||||
# assume if they ret-coded 0 we're good
|
||||
# TODO, find out what kind of messages Windows sends us from mklink
|
||||
# print(stdout)
|
||||
# assume if they ret-coded 0 we're good
|
||||
|
||||
|
||||
def _junctionlink_windows(src, dest):
|
||||
try:
|
||||
|
@ -82,9 +85,10 @@ def _junctionlink_windows(src, dest):
|
|||
except CalledProcessError as err:
|
||||
raise IOError(err.output.decode('utf-8'))
|
||||
|
||||
# TODO, find out what kind of messages Windows sends us from mklink
|
||||
# print(stdout)
|
||||
# assume if they ret-coded 0 we're good
|
||||
# TODO, find out what kind of messages Windows sends us from mklink
|
||||
# print(stdout)
|
||||
# assume if they ret-coded 0 we're good
|
||||
|
||||
|
||||
# Create a hard link to src named as dest
|
||||
# This version of link, unlike os.link, supports nt systems as well
|
||||
|
@ -102,6 +106,7 @@ def symlink(src, dest):
|
|||
else:
|
||||
os.symlink(src, dest)
|
||||
|
||||
|
||||
# Create a symlink to src named as dest, but don't fail if you're on nt
|
||||
def dirlink(src, dest):
|
||||
if os.name == 'nt':
|
||||
|
@ -109,9 +114,10 @@ def dirlink(src, dest):
|
|||
else:
|
||||
os.symlink(src, dest)
|
||||
|
||||
|
||||
# Create a symlink to src named as dest, but don't fail if you're on nt
|
||||
def junctionlink(src, dest):
|
||||
if os.name == 'nt':
|
||||
_junctionlink_windows(src, dest)
|
||||
else:
|
||||
os.symlink(src, dest)
|
||||
os.symlink(src, dest)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue