Skip to content

Commit

Permalink
Update pycatfile.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KazukiPrzyborowski authored Jan 25, 2025
1 parent 99c859d commit 43ed20d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pycatfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def get_default_threads():
__file_format_default__ = "CatFile"
__include_defaults__ = True
__program_name__ = "Py"+__file_format_default__
if os.path.exists(__config_file__) and __use_ini_file__:
if __use_ini_file__ and os.path.exists(__config_file__):
config = configparser.ConfigParser()
config.read(__config_file__)
def decode_unicode_escape(value):
Expand All @@ -308,7 +308,7 @@ def decode_unicode_escape(value):
__file_format_multi_dict__.update( { decode_unicode_escape(config.get(section, 'magic')): {'format_name': decode_unicode_escape(config.get(section, 'name')), 'format_magic': decode_unicode_escape(config.get(section, 'magic')), 'format_lower': decode_unicode_escape(config.get(section, 'lower')), 'format_len': config.getint(section, 'len'), 'format_hex': config.get(section, 'hex'), 'format_delimiter': decode_unicode_escape(config.get(section, 'delimiter')), 'format_ver': config.get(section, 'ver'), 'new_style': config.getboolean(section, 'newstyle'), 'use_advanced_list': config.getboolean(section, 'advancedlist'), 'use_alt_inode': config.getboolean(section, 'altinode'), 'format_extension': decode_unicode_escape(config.get(section, 'extension')) } } )
if not __file_format_multi_dict__ and not __include_defaults__:
__include_defaults__ = True
elif not os.path.exists(__config_file__) and __use_ini_file__:
elif __use_ini_file__ and not os.path.exists(__config_file__):
__use_ini_file__ = False
__include_defaults__ = True
if not __use_ini_file__ and not __include_defaults__:
Expand Down

0 comments on commit 43ed20d

Please sign in to comment.