mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 21:33:13 -07:00
Use generator exp for remote paths
This commit is contained in:
parent
c587a137a5
commit
a5d51d6e5a
1 changed files with 12 additions and 4 deletions
|
@ -491,10 +491,18 @@ def configure_remote_paths():
|
||||||
if REMOTE_PATHS:
|
if REMOTE_PATHS:
|
||||||
if isinstance(REMOTE_PATHS, list):
|
if isinstance(REMOTE_PATHS, list):
|
||||||
REMOTE_PATHS = ','.join(REMOTE_PATHS) # fix in case this imported as list.
|
REMOTE_PATHS = ','.join(REMOTE_PATHS) # fix in case this imported as list.
|
||||||
REMOTE_PATHS = [tuple(item.split(',')) for item in
|
|
||||||
REMOTE_PATHS.split('|')] # /volume1/Public/,E:\|/volume2/share/,\\NAS\
|
REMOTE_PATHS = (
|
||||||
REMOTE_PATHS = [(local.strip(), remote.strip()) for local, remote in
|
# /volume1/Public/,E:\|/volume2/share/,\\NAS\
|
||||||
REMOTE_PATHS] # strip trailing and leading whitespaces
|
tuple(item.split(','))
|
||||||
|
for item in REMOTE_PATHS.split('|')
|
||||||
|
)
|
||||||
|
|
||||||
|
REMOTE_PATHS = [
|
||||||
|
# strip trailing and leading whitespaces
|
||||||
|
(local.strip(), remote.strip())
|
||||||
|
for local, remote in REMOTE_PATHS
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
def initialize(section=None):
|
def initialize(section=None):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue