wip: co_flags

This commit is contained in:
2025-02-28 16:56:15 +08:00
parent 21785687b6
commit dacfd29c02
5 changed files with 16 additions and 10 deletions

View File

@@ -101,7 +101,7 @@ def main():
)
logger = logging.getLogger('shot')
print('''
print(r'''
____ ____
( __ ) ( __ )
| |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| |
@@ -157,8 +157,12 @@ def main():
except:
pass
with open(file_path, 'rb') as f:
beacon = f.read(16 * 1024 * 1024)
try:
with open(file_path, 'rb') as f:
beacon = f.read(16 * 1024 * 1024)
except:
logger.error(f'Failed to read file: {relative_path}')
continue
# is UTF-8 source?
# TODO: only support natural one line now