mirror of
https://github.com/eblot/pybootd.git
synced 2024-09-11 22:17:44 +03:00
Remove UTF8 explicit def
This commit is contained in:
parent
d053b2ed11
commit
9b5184f461
@ -1,6 +1,4 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# Copyright (c) 2010-2019 Emmanuel Blot <emmanuel.blot@free.fr>
|
||||||
#
|
|
||||||
# Copyright (c) 2010-2016 Emmanuel Blot <emmanuel.blot@free.fr>
|
|
||||||
# Copyright (c) 2010-2011 Neotion
|
# Copyright (c) 2010-2011 Neotion
|
||||||
#
|
#
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2010-2019 Emmanuel Blot <emmanuel.blot@free.fr>
|
# Copyright (c) 2010-2019 Emmanuel Blot <emmanuel.blot@free.fr>
|
||||||
# Copyright (c) 2010-2011 Neotion
|
# Copyright (c) 2010-2011 Neotion
|
||||||
@ -20,6 +19,7 @@
|
|||||||
|
|
||||||
"""Tiny BOOTP/DHCP/TFTP/PXE server"""
|
"""Tiny BOOTP/DHCP/TFTP/PXE server"""
|
||||||
|
|
||||||
|
from argparse import ArgumentParser
|
||||||
from os.path import isfile
|
from os.path import isfile
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
from sys import exit as sysexit, modules, stderr
|
from sys import exit as sysexit, modules, stderr
|
||||||
@ -68,7 +68,6 @@ class TftpDaemon(Thread):
|
|||||||
def main():
|
def main():
|
||||||
debug = False
|
debug = False
|
||||||
try:
|
try:
|
||||||
from argparse import ArgumentParser
|
|
||||||
argparser = ArgumentParser(description=modules[__name__].__doc__)
|
argparser = ArgumentParser(description=modules[__name__].__doc__)
|
||||||
argparser.add_argument('-c', '--config', dest='config',
|
argparser.add_argument('-c', '--config', dest='config',
|
||||||
default='pybootd/etc/pybootd.ini',
|
default='pybootd/etc/pybootd.ini',
|
||||||
@ -92,7 +91,7 @@ def main():
|
|||||||
|
|
||||||
cfgparser = EasyConfigParser()
|
cfgparser = EasyConfigParser()
|
||||||
with open(pybootd_path(args.config), 'rt') as config:
|
with open(pybootd_path(args.config), 'rt') as config:
|
||||||
cfgparser.readfp(config)
|
cfgparser.read_file(config)
|
||||||
|
|
||||||
logger = logger_factory(logtype=cfgparser.get('logger', 'type',
|
logger = logger_factory(logtype=cfgparser.get('logger', 'type',
|
||||||
'stderr'),
|
'stderr'),
|
||||||
@ -119,5 +118,5 @@ def main():
|
|||||||
print(format_exc(chain=False), file=stderr)
|
print(format_exc(chain=False), file=stderr)
|
||||||
sysexit(1)
|
sysexit(1)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("\nAborting...")
|
print("\nAborting...", file=stderr)
|
||||||
sysexit(2)
|
sysexit(2)
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
#
|
|
||||||
# Copyright (c) 2010-2019 Emmanuel Blot <emmanuel.blot@free.fr>
|
# Copyright (c) 2010-2019 Emmanuel Blot <emmanuel.blot@free.fr>
|
||||||
# Copyright (c) 2010-2011 Neotion
|
# Copyright (c) 2010-2011 Neotion
|
||||||
#
|
#
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
#
|
|
||||||
# Copyright (c) 2010-2019 Emmanuel Blot <emmanuel.blot@free.fr>
|
# Copyright (c) 2010-2019 Emmanuel Blot <emmanuel.blot@free.fr>
|
||||||
# Copyright (c) 2010-2011 Neotion
|
# Copyright (c) 2010-2011 Neotion
|
||||||
#
|
#
|
||||||
|
3
setup.py
3
setup.py
@ -1,5 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2010-2019 Emmanuel Blot <emmanuel.blot@free.fr>
|
# Copyright (c) 2010-2019 Emmanuel Blot <emmanuel.blot@free.fr>
|
||||||
# Copyright (c) 2010-2011 Neotion
|
# Copyright (c) 2010-2011 Neotion
|
||||||
|
Loading…
Reference in New Issue
Block a user