mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-22 06:13:19 -07:00
Merge branch 'farewell-2.7' into deadsnakes
* farewell-2.7: Python 2 support dropped - `.py` files are UTF-8 by default in Python 3 Python 2 support dropped - removed __future__ imports are default in Python 3 Python 2 support dropped - all classes are new style classes in Python 3
This commit is contained in:
commit
d5d3110b63
44 changed files with 14 additions and 361 deletions
|
@ -1,12 +1,5 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
@ -30,7 +23,7 @@ FOLDER_STRUCTURE = {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class WorkingDirectory(object):
|
class WorkingDirectory:
|
||||||
"""Context manager for changing current working directory."""
|
"""Context manager for changing current working directory."""
|
||||||
|
|
||||||
def __init__(self, new, original=None):
|
def __init__(self, new, original=None):
|
||||||
|
|
|
@ -1,12 +1,3 @@
|
||||||
# coding=utf-8
|
|
||||||
|
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import itertools
|
import itertools
|
||||||
import locale
|
import locale
|
||||||
import os
|
import os
|
||||||
|
|
|
@ -1,12 +1,3 @@
|
||||||
# coding=utf-8
|
|
||||||
|
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
import core
|
import core
|
||||||
|
|
|
@ -1,12 +1,3 @@
|
||||||
# coding=utf-8
|
|
||||||
|
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
|
|
@ -1,16 +1,9 @@
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
from core import logger
|
from core import logger
|
||||||
|
|
||||||
|
|
||||||
class ProcessResult(object):
|
class ProcessResult:
|
||||||
def __init__(self, message, status_code):
|
def __init__(self, message, status_code):
|
||||||
self.message = message
|
self.message = message
|
||||||
self.status_code = status_code
|
self.status_code = status_code
|
||||||
|
|
|
@ -1,12 +1,3 @@
|
||||||
# coding=utf-8
|
|
||||||
|
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,3 @@
|
||||||
# coding=utf-8
|
|
||||||
|
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
|
|
||||||
import core
|
import core
|
||||||
|
@ -26,7 +17,7 @@ import six
|
||||||
from six import iteritems
|
from six import iteritems
|
||||||
|
|
||||||
|
|
||||||
class InitSickBeard(object):
|
class InitSickBeard:
|
||||||
"""Sickbeard init class.
|
"""Sickbeard init class.
|
||||||
|
|
||||||
Used to determin which sickbeard fork object to initialize.
|
Used to determin which sickbeard fork object to initialize.
|
||||||
|
@ -316,7 +307,7 @@ class InitSickBeard(object):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class SickBeard(object):
|
class SickBeard:
|
||||||
"""Sickbeard base class."""
|
"""Sickbeard base class."""
|
||||||
|
|
||||||
def __init__(self, sb_init):
|
def __init__(self, sb_init):
|
||||||
|
|
|
@ -1,12 +1,3 @@
|
||||||
# coding=utf-8
|
|
||||||
|
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
|
|
|
@ -1,12 +1,3 @@
|
||||||
# coding=utf-8
|
|
||||||
|
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
|
|
|
@ -1,12 +1,3 @@
|
||||||
# coding=utf-8
|
|
||||||
|
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
import errno
|
import errno
|
||||||
import json
|
import json
|
||||||
|
|
|
@ -1,12 +1,3 @@
|
||||||
# coding=utf-8
|
|
||||||
|
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
|
|
|
@ -1,12 +1,3 @@
|
||||||
# coding=utf-8
|
|
||||||
|
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
from core import logger, main_db
|
from core import logger, main_db
|
||||||
from core.utils import backup_versioned_file
|
from core.utils import backup_versioned_file
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,3 @@
|
||||||
# coding=utf-8
|
|
||||||
|
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
import shutil
|
import shutil
|
||||||
|
|
|
@ -1,16 +1,7 @@
|
||||||
# coding=utf-8
|
|
||||||
|
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
|
|
||||||
class GitHub(object):
|
class GitHub:
|
||||||
"""Simple api wrapper for the Github API v3."""
|
"""Simple api wrapper for the Github API v3."""
|
||||||
|
|
||||||
def __init__(self, github_repo_user, github_repo, branch='master'):
|
def __init__(self, github_repo_user, github_repo, branch='master'):
|
||||||
|
|
|
@ -1,12 +1,3 @@
|
||||||
# coding=utf-8
|
|
||||||
|
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
@ -36,7 +27,7 @@ reverseNames = {u'ERROR': ERROR,
|
||||||
u'DB': DB}
|
u'DB': DB}
|
||||||
|
|
||||||
|
|
||||||
class NTMRotatingLogHandler(object):
|
class NTMRotatingLogHandler:
|
||||||
def __init__(self, log_file, num_files, num_bytes):
|
def __init__(self, log_file, num_files, num_bytes):
|
||||||
self.num_files = num_files
|
self.num_files = num_files
|
||||||
self.num_bytes = num_bytes
|
self.num_bytes = num_bytes
|
||||||
|
@ -240,7 +231,7 @@ class NTMRotatingLogHandler(object):
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
class DispatchingFormatter(object):
|
class DispatchingFormatter:
|
||||||
def __init__(self, formatters, default_formatter):
|
def __init__(self, formatters, default_formatter):
|
||||||
self._formatters = formatters
|
self._formatters = formatters
|
||||||
self._default_formatter = default_formatter
|
self._default_formatter = default_formatter
|
||||||
|
|
|
@ -1,12 +1,3 @@
|
||||||
# coding=utf-8
|
|
||||||
|
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import sqlite3
|
import sqlite3
|
||||||
import time
|
import time
|
||||||
|
@ -42,7 +33,6 @@ if PY2:
|
||||||
else:
|
else:
|
||||||
from sqlite3 import Row
|
from sqlite3 import Row
|
||||||
|
|
||||||
|
|
||||||
def db_filename(filename='nzbtomedia.db', suffix=None):
|
def db_filename(filename='nzbtomedia.db', suffix=None):
|
||||||
"""
|
"""
|
||||||
Return the correct location of the database file.
|
Return the correct location of the database file.
|
||||||
|
@ -58,7 +48,7 @@ def db_filename(filename='nzbtomedia.db', suffix=None):
|
||||||
return core.os.path.join(core.APP_ROOT, filename)
|
return core.os.path.join(core.APP_ROOT, filename)
|
||||||
|
|
||||||
|
|
||||||
class DBConnection(object):
|
class DBConnection:
|
||||||
def __init__(self, filename='nzbtomedia.db', suffix=None, row_type=None):
|
def __init__(self, filename='nzbtomedia.db', suffix=None, row_type=None):
|
||||||
|
|
||||||
self.filename = filename
|
self.filename = filename
|
||||||
|
@ -242,7 +232,7 @@ def sanity_check_database(connection, sanity_check):
|
||||||
sanity_check(connection).check()
|
sanity_check(connection).check()
|
||||||
|
|
||||||
|
|
||||||
class DBSanityCheck(object):
|
class DBSanityCheck:
|
||||||
def __init__(self, connection):
|
def __init__(self, connection):
|
||||||
self.connection = connection
|
self.connection = connection
|
||||||
|
|
||||||
|
@ -287,7 +277,7 @@ def _process_upgrade(connection, upgrade_class):
|
||||||
|
|
||||||
|
|
||||||
# Base migration class. All future DB changes should be subclassed from this class
|
# Base migration class. All future DB changes should be subclassed from this class
|
||||||
class SchemaUpgrade(object):
|
class SchemaUpgrade:
|
||||||
def __init__(self, connection):
|
def __init__(self, connection):
|
||||||
self.connection = connection
|
self.connection = connection
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import core
|
import core
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import core
|
import core
|
||||||
from core.plugins.downloaders.torrent.utils import create_torrent_class
|
from core.plugins.downloaders.torrent.utils import create_torrent_class
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
from deluge_client.client import DelugeRPCClient
|
from deluge_client.client import DelugeRPCClient
|
||||||
|
|
||||||
import core
|
import core
|
||||||
|
|
|
@ -1,11 +1,3 @@
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
from qbittorrent import Client as qBittorrentClient
|
from qbittorrent import Client as qBittorrentClient
|
||||||
|
|
||||||
import core
|
import core
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
from syno.downloadstation import DownloadStation
|
from syno.downloadstation import DownloadStation
|
||||||
|
|
||||||
import core
|
import core
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
from transmissionrpc.client import Client as TransmissionClient
|
from transmissionrpc.client import Client as TransmissionClient
|
||||||
|
|
||||||
import core
|
import core
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import core
|
import core
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
from utorrent.client import UTorrentClient
|
from utorrent.client import UTorrentClient
|
||||||
|
|
||||||
import core
|
import core
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
import core
|
import core
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
from babelfish import Language
|
from babelfish import Language
|
||||||
import subliminal
|
import subliminal
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,3 @@
|
||||||
# coding=utf-8
|
|
||||||
|
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
import re
|
import re
|
||||||
|
|
|
@ -1,12 +1,3 @@
|
||||||
# coding=utf-8
|
|
||||||
|
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import errno
|
import errno
|
||||||
import json
|
import json
|
||||||
import sys
|
import sys
|
||||||
|
|
|
@ -1,12 +1,3 @@
|
||||||
# coding=utf-8
|
|
||||||
|
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from subprocess import Popen
|
from subprocess import Popen
|
||||||
|
|
||||||
|
@ -19,7 +10,6 @@ from core.auto_process.common import (
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def external_script(output_destination, torrent_name, torrent_label, settings):
|
def external_script(output_destination, torrent_name, torrent_label, settings):
|
||||||
final_result = 0 # start at 0.
|
final_result = 0 # start at 0.
|
||||||
num_files = 0
|
num_files = 0
|
||||||
|
|
|
@ -1,12 +1,3 @@
|
||||||
# coding=utf-8
|
|
||||||
|
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
from core.utils import shutil_custom
|
from core.utils import shutil_custom
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
from six import text_type
|
from six import text_type
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from six import text_type
|
from six import text_type
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from six import text_type
|
from six import text_type
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import socket
|
import socket
|
||||||
import struct
|
import struct
|
||||||
import time
|
import time
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import core
|
import core
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
from functools import partial
|
from functools import partial
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
|
@ -1,9 +1,3 @@
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import socket
|
import socket
|
||||||
|
@ -19,7 +13,7 @@ if os.name == 'nt':
|
||||||
from winerror import ERROR_ALREADY_EXISTS
|
from winerror import ERROR_ALREADY_EXISTS
|
||||||
|
|
||||||
|
|
||||||
class WindowsProcess(object):
|
class WindowsProcess:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.mutex = None
|
self.mutex = None
|
||||||
self.mutexname = 'nzbtomedia_{pid}'.format(pid=core.PID_FILE.replace('\\', '/')) # {D0E858DF-985E-4907-B7FB-8D732C3FC3B9}'
|
self.mutexname = 'nzbtomedia_{pid}'.format(pid=core.PID_FILE.replace('\\', '/')) # {D0E858DF-985E-4907-B7FB-8D732C3FC3B9}'
|
||||||
|
@ -42,7 +36,7 @@ class WindowsProcess(object):
|
||||||
self.CloseHandle(self.mutex)
|
self.CloseHandle(self.mutex)
|
||||||
|
|
||||||
|
|
||||||
class PosixProcess(object):
|
class PosixProcess:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.pidpath = core.PID_FILE
|
self.pidpath = core.PID_FILE
|
||||||
self.lock_socket = None
|
self.lock_socket = None
|
||||||
|
|
|
@ -1,14 +1,6 @@
|
||||||
# coding=utf-8
|
|
||||||
# Author: Nic Wolfe <nic@wolfeden.ca>
|
# Author: Nic Wolfe <nic@wolfeden.ca>
|
||||||
# Modified by: echel0n
|
# Modified by: echel0n
|
||||||
|
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
import re
|
import re
|
||||||
|
@ -25,7 +17,7 @@ import core
|
||||||
from core import github_api as github, logger
|
from core import github_api as github, logger
|
||||||
|
|
||||||
|
|
||||||
class CheckVersion(object):
|
class CheckVersion:
|
||||||
"""Version checker that runs in a thread with the SB scheduler."""
|
"""Version checker that runs in a thread with the SB scheduler."""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
@ -88,7 +80,7 @@ class CheckVersion(object):
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
class UpdateManager(object):
|
class UpdateManager:
|
||||||
def get_github_repo_user(self):
|
def get_github_repo_user(self):
|
||||||
return core.GIT_USER
|
return core.GIT_USER
|
||||||
|
|
||||||
|
|
7
eol.py
7
eol.py
|
@ -1,12 +1,5 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
from __future__ import (
|
|
||||||
absolute_import,
|
|
||||||
division,
|
|
||||||
print_function,
|
|
||||||
unicode_literals,
|
|
||||||
)
|
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
import sys
|
import sys
|
||||||
import warnings
|
import warnings
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue