mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-18 09:57:40 +03:00
replaced ors with defaults in config usage
This commit is contained in:
parent
f76e5d331e
commit
278480b99f
6
EDMC.py
6
EDMC.py
@ -189,7 +189,7 @@ sys.path: {sys.path}'''
|
|||||||
# Get state from latest Journal file
|
# Get state from latest Journal file
|
||||||
logger.debug('Getting state from latest journal file')
|
logger.debug('Getting state from latest journal file')
|
||||||
try:
|
try:
|
||||||
logdir = config.get_str('journaldir', str(config.default_journal_dir))
|
logdir = config.get_str('journaldir', default=str(config.default_journal_dir))
|
||||||
logger.debug(f'logdir = "{logdir}"')
|
logger.debug(f'logdir = "{logdir}"')
|
||||||
logfiles = sorted((x for x in os.listdir(logdir) if JOURNAL_RE.search(x)),
|
logfiles = sorted((x for x in os.listdir(logdir) if JOURNAL_RE.search(x)),
|
||||||
key=lambda x: x.split('.')[1:])
|
key=lambda x: x.split('.')[1:])
|
||||||
@ -215,7 +215,7 @@ sys.path: {sys.path}'''
|
|||||||
# Get data from Companion API
|
# Get data from Companion API
|
||||||
if args.p:
|
if args.p:
|
||||||
logger.debug(f'Attempting to use commander "{args.p}"')
|
logger.debug(f'Attempting to use commander "{args.p}"')
|
||||||
cmdrs = config.get_list('cmdrs', [])
|
cmdrs = config.get_list('cmdrs', default=[])
|
||||||
if args.p in cmdrs:
|
if args.p in cmdrs:
|
||||||
idx = cmdrs.index(args.p)
|
idx = cmdrs.index(args.p)
|
||||||
|
|
||||||
@ -231,7 +231,7 @@ sys.path: {sys.path}'''
|
|||||||
|
|
||||||
else:
|
else:
|
||||||
logger.debug(f'Attempting to use commander "{monitor.cmdr}" from Journal File')
|
logger.debug(f'Attempting to use commander "{monitor.cmdr}" from Journal File')
|
||||||
cmdrs = config.get_list('cmdrs', [])
|
cmdrs = config.get_list('cmdrs', default=[])
|
||||||
if monitor.cmdr not in cmdrs:
|
if monitor.cmdr not in cmdrs:
|
||||||
raise companion.CredentialsError()
|
raise companion.CredentialsError()
|
||||||
|
|
||||||
|
@ -390,7 +390,7 @@ class AppWindow(object):
|
|||||||
|
|
||||||
def __init__(self, master: tk.Tk): # noqa: C901, CCR001 # TODO - can possibly factor something out
|
def __init__(self, master: tk.Tk): # noqa: C901, CCR001 # TODO - can possibly factor something out
|
||||||
|
|
||||||
self.holdofftime = config.get_int('querytime', 0) + companion.holdoff
|
self.holdofftime = config.get_int('querytime', default=0) + companion.holdoff
|
||||||
|
|
||||||
self.w = master
|
self.w = master
|
||||||
self.w.title(applongname)
|
self.w.title(applongname)
|
||||||
@ -645,7 +645,7 @@ class AppWindow(object):
|
|||||||
self.updater.checkForUpdates() # Sparkle / WinSparkle does this automatically for packaged apps
|
self.updater.checkForUpdates() # Sparkle / WinSparkle does this automatically for packaged apps
|
||||||
|
|
||||||
# Migration from <= 3.30
|
# Migration from <= 3.30
|
||||||
for username in config.get_list('fdev_usernames', []):
|
for username in config.get_list('fdev_usernames', default=[]):
|
||||||
config.delete_password(username)
|
config.delete_password(username)
|
||||||
config.delete('fdev_usernames')
|
config.delete('fdev_usernames')
|
||||||
config.delete('username')
|
config.delete('username')
|
||||||
@ -1023,7 +1023,7 @@ class AppWindow(object):
|
|||||||
# Companion login
|
# Companion login
|
||||||
if entry['event'] in [None, 'StartUp', 'NewCommander', 'LoadGame'] and monitor.cmdr:
|
if entry['event'] in [None, 'StartUp', 'NewCommander', 'LoadGame'] and monitor.cmdr:
|
||||||
if not config.get_list('cmdrs') or monitor.cmdr not in config.get_list('cmdrs'):
|
if not config.get_list('cmdrs') or monitor.cmdr not in config.get_list('cmdrs'):
|
||||||
config.set('cmdrs', config.get_list('cmdrs', []) + [monitor.cmdr])
|
config.set('cmdrs', config.get_list('cmdrs', default=[]) + [monitor.cmdr])
|
||||||
self.login()
|
self.login()
|
||||||
|
|
||||||
if not entry['event'] or not monitor.mode:
|
if not entry['event'] or not monitor.mode:
|
||||||
@ -1568,7 +1568,7 @@ sys.path: {sys.path}'''
|
|||||||
|
|
||||||
def messagebox_not_py3():
|
def messagebox_not_py3():
|
||||||
"""Display message about plugins not updated for Python 3.x."""
|
"""Display message about plugins not updated for Python 3.x."""
|
||||||
plugins_not_py3_last = config.get_int('plugins_not_py3_last') or 0
|
plugins_not_py3_last = config.get_int('plugins_not_py3_last', default=0)
|
||||||
if (plugins_not_py3_last + 86400) < int(time()) and len(plug.PLUGINS_not_py3):
|
if (plugins_not_py3_last + 86400) < int(time()) and len(plug.PLUGINS_not_py3):
|
||||||
# Yes, this is horribly hacky so as to be sure we match the key
|
# Yes, this is horribly hacky so as to be sure we match the key
|
||||||
# that we told Translators to use.
|
# that we told Translators to use.
|
||||||
|
@ -20,7 +20,7 @@ bracketmap = {
|
|||||||
|
|
||||||
|
|
||||||
def export(data, kind=COMMODITY_DEFAULT, filename=None):
|
def export(data, kind=COMMODITY_DEFAULT, filename=None):
|
||||||
querytime = config.get_int('querytime') or int(time.time())
|
querytime = config.get_int('querytime', default=int(time.time()))
|
||||||
|
|
||||||
if not filename:
|
if not filename:
|
||||||
filename = '{system}.{starport}.{time}.{kind}'.format(
|
filename = '{system}.{starport}.{time}.{kind}'.format(
|
||||||
|
12
companion.py
12
companion.py
@ -285,13 +285,13 @@ class Auth(object):
|
|||||||
logger.debug(f'Trying for "{self.cmdr}"')
|
logger.debug(f'Trying for "{self.cmdr}"')
|
||||||
|
|
||||||
self.verifier = None
|
self.verifier = None
|
||||||
cmdrs = config.get_list('cmdrs', [])
|
cmdrs = config.get_list('cmdrs', default=[])
|
||||||
logger.debug(f'Cmdrs: {cmdrs}')
|
logger.debug(f'Cmdrs: {cmdrs}')
|
||||||
|
|
||||||
idx = cmdrs.index(self.cmdr)
|
idx = cmdrs.index(self.cmdr)
|
||||||
logger.debug(f'idx = {idx}')
|
logger.debug(f'idx = {idx}')
|
||||||
|
|
||||||
tokens = config.get_list('fdev_apikeys', [])
|
tokens = config.get_list('fdev_apikeys', default=[])
|
||||||
tokens = tokens + [''] * (len(cmdrs) - len(tokens))
|
tokens = tokens + [''] * (len(cmdrs) - len(tokens))
|
||||||
if tokens[idx]:
|
if tokens[idx]:
|
||||||
logger.debug('We have a refresh token for that idx')
|
logger.debug('We have a refresh token for that idx')
|
||||||
@ -375,9 +375,9 @@ class Auth(object):
|
|||||||
data = r.json()
|
data = r.json()
|
||||||
if r.status_code == requests.codes.ok:
|
if r.status_code == requests.codes.ok:
|
||||||
logger.info(f'Frontier CAPI Auth: New token for \"{self.cmdr}\"')
|
logger.info(f'Frontier CAPI Auth: New token for \"{self.cmdr}\"')
|
||||||
cmdrs = config.get_list('cmdrs', [])
|
cmdrs = config.get_list('cmdrs', default=[])
|
||||||
idx = cmdrs.index(self.cmdr)
|
idx = cmdrs.index(self.cmdr)
|
||||||
tokens = config.get_list('fdev_apikeys', [])
|
tokens = config.get_list('fdev_apikeys', default=[])
|
||||||
tokens = tokens + [''] * (len(cmdrs) - len(tokens))
|
tokens = tokens + [''] * (len(cmdrs) - len(tokens))
|
||||||
tokens[idx] = data.get('refresh_token', '')
|
tokens[idx] = data.get('refresh_token', '')
|
||||||
config.set('fdev_apikeys', tokens)
|
config.set('fdev_apikeys', tokens)
|
||||||
@ -404,9 +404,9 @@ class Auth(object):
|
|||||||
def invalidate(cmdr: str) -> None:
|
def invalidate(cmdr: str) -> None:
|
||||||
"""Invalidate Refresh Token for specified Commander."""
|
"""Invalidate Refresh Token for specified Commander."""
|
||||||
logger.info(f'Frontier CAPI Auth: Invalidated token for "{cmdr}"')
|
logger.info(f'Frontier CAPI Auth: Invalidated token for "{cmdr}"')
|
||||||
cmdrs = config.get_list('cmdrs', [])
|
cmdrs = config.get_list('cmdrs', default=[])
|
||||||
idx = cmdrs.index(cmdr)
|
idx = cmdrs.index(cmdr)
|
||||||
tokens = config.get_list('fdev_apikeys', [])
|
tokens = config.get_list('fdev_apikeys', default=[])
|
||||||
tokens = tokens + [''] * (len(cmdrs) - len(tokens))
|
tokens = tokens + [''] * (len(cmdrs) - len(tokens))
|
||||||
tokens[idx] = ''
|
tokens[idx] = ''
|
||||||
config.set('fdev_apikeys', tokens)
|
config.set('fdev_apikeys', tokens)
|
||||||
|
@ -41,7 +41,7 @@ class Dashboard(FileSystemEventHandler):
|
|||||||
self.root = root
|
self.root = root
|
||||||
self.session_start = started
|
self.session_start = started
|
||||||
|
|
||||||
logdir = config.get_str('journaldir', str(config.default_journal_dir))
|
logdir = config.get_str('journaldir', default=str(config.default_journal_dir))
|
||||||
if not logdir or not isdir(logdir):
|
if not logdir or not isdir(logdir):
|
||||||
logger.info(f"No logdir, or it isn't a directory: {logdir=}")
|
logger.info(f"No logdir, or it isn't a directory: {logdir=}")
|
||||||
self.stop()
|
self.stop()
|
||||||
|
@ -74,7 +74,7 @@ def export(data, filename=None):
|
|||||||
|
|
||||||
return ret + ' '
|
return ret + ' '
|
||||||
|
|
||||||
querytime = config.get_int('querytime') or int(time.time())
|
querytime = config.get_int('querytime', default=int(time.time()))
|
||||||
|
|
||||||
loadout = defaultdict(list)
|
loadout = defaultdict(list)
|
||||||
mass = 0.0
|
mass = 0.0
|
||||||
|
@ -28,7 +28,7 @@ def export(data, filename=None):
|
|||||||
if h.read() == string:
|
if h.read() == string:
|
||||||
return # same as last time - don't write
|
return # same as last time - don't write
|
||||||
|
|
||||||
querytime = config.get_int('querytime') or int(time.time())
|
querytime = config.get_int('querytime', default=int(time.time()))
|
||||||
|
|
||||||
# Write
|
# Write
|
||||||
filename = join(config.get_str('outdir'), '%s.%s.txt' % (ship, time.strftime('%Y-%m-%dT%H.%M.%S', time.localtime(querytime))))
|
filename = join(config.get_str('outdir'), '%s.%s.txt' % (ship, time.strftime('%Y-%m-%dT%H.%M.%S', time.localtime(querytime))))
|
||||||
|
@ -129,7 +129,7 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below
|
|||||||
"""Start journal monitoring."""
|
"""Start journal monitoring."""
|
||||||
logger.debug('Begin...')
|
logger.debug('Begin...')
|
||||||
self.root = root
|
self.root = root
|
||||||
journal_dir = config.get_str('journaldir', str(config.default_journal_dir))
|
journal_dir = config.get_str('journaldir', default=str(config.default_journal_dir))
|
||||||
|
|
||||||
if journal_dir is None:
|
if journal_dir is None:
|
||||||
logger.debug('journal_dir was None, setting ""')
|
logger.debug('journal_dir was None, setting ""')
|
||||||
|
@ -509,7 +509,7 @@ def lookup(module, ship_map, entitled=False):
|
|||||||
|
|
||||||
def export(data, filename):
|
def export(data, filename):
|
||||||
|
|
||||||
querytime = config.get_int('querytime') or int(time.time())
|
querytime = config.get_int('querytime', default=int(time.time()))
|
||||||
|
|
||||||
assert data['lastSystem'].get('name')
|
assert data['lastSystem'].get('name')
|
||||||
assert data['lastStarport'].get('name')
|
assert data['lastStarport'].get('name')
|
||||||
|
@ -728,7 +728,7 @@ def journal_entry( # noqa: C901
|
|||||||
this.commodities = this.outfitting = this.shipyard = None
|
this.commodities = this.outfitting = this.shipyard = None
|
||||||
this.marketId = entry['MarketID']
|
this.marketId = entry['MarketID']
|
||||||
|
|
||||||
path = pathlib.Path(str(config.get_str('journaldir') or config.default_journal_dir)) / f'{entry["event"]}.json'
|
path = pathlib.Path(config.get_str('journaldir', str(config.default_journal_dir))) / f'{entry["event"]}.json'
|
||||||
with path.open('rb') as f:
|
with path.open('rb') as f:
|
||||||
entry = json.load(f)
|
entry = json.load(f)
|
||||||
if entry['event'] == 'Market':
|
if entry['event'] == 'Market':
|
||||||
|
@ -131,8 +131,8 @@ def plugin_start3(plugin_dir: str) -> str:
|
|||||||
|
|
||||||
elif config.get_list('edsm_cmdrname'):
|
elif config.get_list('edsm_cmdrname'):
|
||||||
# Migrate <= 2.25 settings. edsm_cmdrs is unknown at this time
|
# Migrate <= 2.25 settings. edsm_cmdrs is unknown at this time
|
||||||
config.set('edsm_usernames', [config.get_str('edsm_cmdrname') or ''])
|
config.set('edsm_usernames', [config.get_str('edsm_cmdrname', default='')])
|
||||||
config.set('edsm_apikeys', [config.get_str('edsm_apikey') or ''])
|
config.set('edsm_apikeys', [config.get_str('edsm_apikey', default='')])
|
||||||
|
|
||||||
config.delete('edsm_cmdrname')
|
config.delete('edsm_cmdrname')
|
||||||
config.delete('edsm_apikey')
|
config.delete('edsm_apikey')
|
||||||
@ -289,9 +289,9 @@ def prefs_changed(cmdr: str, is_beta: bool) -> None:
|
|||||||
|
|
||||||
if cmdr and not is_beta:
|
if cmdr and not is_beta:
|
||||||
# TODO: remove this when config is rewritten.
|
# TODO: remove this when config is rewritten.
|
||||||
cmdrs: List[str] = config.get_list('edsm_cmdrs', [])
|
cmdrs: List[str] = config.get_list('edsm_cmdrs', default=[])
|
||||||
usernames: List[str] = config.get_list('edsm_usernames', [])
|
usernames: List[str] = config.get_list('edsm_usernames', default=[])
|
||||||
apikeys: List[str] = config.get_list('edsm_apikeys', [])
|
apikeys: List[str] = config.get_list('edsm_apikeys', default=[])
|
||||||
|
|
||||||
if cmdr in cmdrs:
|
if cmdr in cmdrs:
|
||||||
idx = cmdrs.index(cmdr)
|
idx = cmdrs.index(cmdr)
|
||||||
|
@ -277,8 +277,8 @@ def prefs_changed(cmdr: str, is_beta: bool) -> None:
|
|||||||
if cmdr and not is_beta:
|
if cmdr and not is_beta:
|
||||||
this.cmdr = cmdr
|
this.cmdr = cmdr
|
||||||
this.FID = None
|
this.FID = None
|
||||||
cmdrs = config.get_list('inara_cmdrs', [])
|
cmdrs = config.get_list('inara_cmdrs', default=[])
|
||||||
apikeys = config.get_list('inara_apikeys', [])
|
apikeys = config.get_list('inara_apikeys', default=[])
|
||||||
if cmdr in cmdrs:
|
if cmdr in cmdrs:
|
||||||
idx = cmdrs.index(cmdr)
|
idx = cmdrs.index(cmdr)
|
||||||
apikeys.extend([''] * (1 + idx - len(apikeys)))
|
apikeys.extend([''] * (1 + idx - len(apikeys)))
|
||||||
@ -309,7 +309,7 @@ def credentials(cmdr: str) -> Optional[str]:
|
|||||||
if not cmdr:
|
if not cmdr:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
cmdrs = config.get_list('inara_cmdrs', [])
|
cmdrs = config.get_list('inara_cmdrs', default=[])
|
||||||
if cmdr in cmdrs and config.get_list('inara_apikeys'):
|
if cmdr in cmdrs and config.get_list('inara_apikeys'):
|
||||||
return config.get_list('inara_apikeys')[cmdrs.index(cmdr)]
|
return config.get_list('inara_apikeys')[cmdrs.index(cmdr)]
|
||||||
|
|
||||||
|
20
prefs.py
20
prefs.py
@ -195,14 +195,15 @@ elif platform == 'win32':
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
# https://msdn.microsoft.com/en-us/library/windows/desktop/bb762115
|
# https://msdn.microsoft.com/en-us/library/windows/desktop/bb762115
|
||||||
BIF_RETURNONLYFSDIRS = 0x00000001
|
BIF_RETURNONLYFSDIRS = 0x00000001
|
||||||
BIF_USENEWUI = 0x00000050
|
BIF_USENEWUI = 0x00000050
|
||||||
BFFM_INITIALIZED = 1
|
BFFM_INITIALIZED = 1
|
||||||
BFFM_SETSELECTION = 0x00000467
|
BFFM_SETSELECTION = 0x00000467
|
||||||
BrowseCallbackProc = ctypes.WINFUNCTYPE(ctypes.c_int, HWND, ctypes.c_uint, LPARAM, LPARAM)
|
BrowseCallbackProc = ctypes.WINFUNCTYPE(ctypes.c_int, HWND, ctypes.c_uint, LPARAM, LPARAM)
|
||||||
|
|
||||||
class BROWSEINFO(ctypes.Structure):
|
class BROWSEINFO(ctypes.Structure):
|
||||||
_fields_ = [("hwndOwner", HWND), ("pidlRoot", LPVOID), ("pszDisplayName", LPWSTR), ("lpszTitle", LPCWSTR), ("ulFlags", UINT), ("lpfn", BrowseCallbackProc), ("lParam", LPCWSTR), ("iImage", ctypes.c_int)]
|
_fields_ = [("hwndOwner", HWND), ("pidlRoot", LPVOID), ("pszDisplayName", LPWSTR), ("lpszTitle", LPCWSTR),
|
||||||
|
("ulFlags", UINT), ("lpfn", BrowseCallbackProc), ("lParam", LPCWSTR), ("iImage", ctypes.c_int)]
|
||||||
|
|
||||||
CalculatePopupWindowPosition = None
|
CalculatePopupWindowPosition = None
|
||||||
if not is_wine:
|
if not is_wine:
|
||||||
@ -407,7 +408,8 @@ class PreferencesDialog(tk.Toplevel):
|
|||||||
row = AutoInc(start=1)
|
row = AutoInc(start=1)
|
||||||
|
|
||||||
self.logdir = tk.StringVar()
|
self.logdir = tk.StringVar()
|
||||||
self.logdir.set(str(config.get_str('journaldir') or config.default_journal_dir or ''))
|
default = str(config.default_journal_dir) if config.default_journal_dir is not None else ''
|
||||||
|
self.logdir.set(str(config.get_str('journaldir', default=default)))
|
||||||
self.logdir_entry = nb.Entry(config_frame, takefocus=False)
|
self.logdir_entry = nb.Entry(config_frame, takefocus=False)
|
||||||
|
|
||||||
# Location of the new Journal file in E:D 2.2
|
# Location of the new Journal file in E:D 2.2
|
||||||
@ -532,7 +534,7 @@ class PreferencesDialog(tk.Toplevel):
|
|||||||
self.shipyard_provider = tk.StringVar(
|
self.shipyard_provider = tk.StringVar(
|
||||||
value=str(
|
value=str(
|
||||||
config.get_str('shipyard_provider') in plug.provides('shipyard_url')
|
config.get_str('shipyard_provider') in plug.provides('shipyard_url')
|
||||||
and config.get_str('shipyard_provider', 'EDSY'))
|
and config.get_str('shipyard_provider', default='EDSY'))
|
||||||
)
|
)
|
||||||
# Setting to decide which ship outfitting website to link to - either E:D Shipyard or Coriolis
|
# Setting to decide which ship outfitting website to link to - either E:D Shipyard or Coriolis
|
||||||
nb.Label(config_frame, text=_('Shipyard')).grid(padx=self.PADX, pady=2*self.PADY, sticky=tk.W, row=cur_row)
|
nb.Label(config_frame, text=_('Shipyard')).grid(padx=self.PADX, pady=2*self.PADY, sticky=tk.W, row=cur_row)
|
||||||
@ -628,7 +630,7 @@ class PreferencesDialog(tk.Toplevel):
|
|||||||
def __setup_appearance_tab(self, notebook: Notebook) -> None:
|
def __setup_appearance_tab(self, notebook: Notebook) -> None:
|
||||||
self.languages = Translations.available_names()
|
self.languages = Translations.available_names()
|
||||||
# Appearance theme and language setting
|
# Appearance theme and language setting
|
||||||
self.lang = tk.StringVar(value=self.languages.get(config.get_str('language'), _('Default')))
|
self.lang = tk.StringVar(value=self.languages.get(config.get_str('language'), default=_('Default')))
|
||||||
self.always_ontop = tk.BooleanVar(value=bool(config.get_int('always_ontop')))
|
self.always_ontop = tk.BooleanVar(value=bool(config.get_int('always_ontop')))
|
||||||
self.theme = tk.IntVar(value=config.get_int('theme'))
|
self.theme = tk.IntVar(value=config.get_int('theme'))
|
||||||
self.theme_colors = [config.get_str('dark_text'), config.get_str('dark_highlight')]
|
self.theme_colors = [config.get_str('dark_text'), config.get_str('dark_highlight')]
|
||||||
@ -1113,7 +1115,7 @@ class PreferencesDialog(tk.Toplevel):
|
|||||||
|
|
||||||
lang_codes = {v: k for k, v in self.languages.items()} # Codes by name
|
lang_codes = {v: k for k, v in self.languages.items()} # Codes by name
|
||||||
config.set('language', lang_codes.get(self.lang.get()) or '') # or '' used here due to Default being None above
|
config.set('language', lang_codes.get(self.lang.get()) or '') # or '' used here due to Default being None above
|
||||||
Translations.install(config.get_str('language') or None) # type: ignore # This sets self in weird ways.
|
Translations.install(config.get_str('language', default=None)) # type: ignore # This sets self in weird ways.
|
||||||
|
|
||||||
config.set('ui_scale', self.ui_scale.get())
|
config.set('ui_scale', self.ui_scale.get())
|
||||||
config.set('always_ontop', self.always_ontop.get())
|
config.set('always_ontop', self.always_ontop.get())
|
||||||
|
@ -8,7 +8,7 @@ from config import config
|
|||||||
|
|
||||||
def export(data, filename):
|
def export(data, filename):
|
||||||
|
|
||||||
querytime = config.get_int('querytime', int(time.time()))
|
querytime = config.get_int('querytime', default=int(time.time()))
|
||||||
|
|
||||||
assert data['lastSystem'].get('name')
|
assert data['lastSystem'].get('name')
|
||||||
assert data['lastStarport'].get('name')
|
assert data['lastStarport'].get('name')
|
||||||
|
2
td.py
2
td.py
@ -22,7 +22,7 @@ stockbracketmap = { 0: '-',
|
|||||||
|
|
||||||
def export(data):
|
def export(data):
|
||||||
|
|
||||||
querytime = config.get_int('querytime', int(time.time()))
|
querytime = config.get_int('querytime', default=int(time.time()))
|
||||||
|
|
||||||
filename = join(config.get_str('outdir'), '%s.%s.%s.prices' % (data['lastSystem']['name'].strip(), data['lastStarport']['name'].strip(), time.strftime('%Y-%m-%dT%H.%M.%S', time.localtime(querytime))))
|
filename = join(config.get_str('outdir'), '%s.%s.%s.prices' % (data['lastSystem']['name'].strip(), data['lastStarport']['name'].strip(), time.strftime('%Y-%m-%dT%H.%M.%S', time.localtime(querytime))))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user