mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-29 19:18:28 -07:00
Fix PEP8 variable and argument names should be snake_case
This commit is contained in:
parent
985f004e32
commit
c2f0f3affc
2 changed files with 7 additions and 7 deletions
|
@ -26,18 +26,18 @@ class DelugeClient(object):
|
|||
def _get_local_auth(self):
|
||||
username = password = ""
|
||||
if platform.system() in ('Windows', 'Microsoft'):
|
||||
appDataPath = os.environ.get("APPDATA")
|
||||
if not appDataPath:
|
||||
app_data_path = os.environ.get("APPDATA")
|
||||
if not app_data_path:
|
||||
from six.moves import winreg
|
||||
hkey = winreg.OpenKey(
|
||||
winreg.HKEY_CURRENT_USER,
|
||||
"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders",
|
||||
)
|
||||
appDataReg = winreg.QueryValueEx(hkey, "AppData")
|
||||
appDataPath = appDataReg[0]
|
||||
app_data_reg = winreg.QueryValueEx(hkey, "AppData")
|
||||
app_data_path = app_data_reg[0]
|
||||
winreg.CloseKey(hkey)
|
||||
|
||||
auth_file = os.path.join(appDataPath, "deluge", "auth")
|
||||
auth_file = os.path.join(app_data_path, "deluge", "auth")
|
||||
else:
|
||||
from xdg.BaseDirectory import save_config_path
|
||||
try:
|
||||
|
|
|
@ -23,9 +23,9 @@ class MultiPartForm(object):
|
|||
self.form_fields.append((name, value))
|
||||
return
|
||||
|
||||
def add_file(self, fieldname, filename, fileHandle, mimetype=None):
|
||||
def add_file(self, fieldname, filename, file_handle, mimetype=None):
|
||||
"""Add a file to be uploaded."""
|
||||
body = fileHandle.read()
|
||||
body = file_handle.read()
|
||||
if mimetype is None:
|
||||
mimetype = mimetypes.guess_type(filename)[0] or 'application/octet-stream'
|
||||
self.files.append((fieldname, filename, mimetype, body))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue