Browse Source

py-i2phosts-*: do imports from system-wide pyi2phosts

pull/1/head
Hidden Z 14 years ago
parent
commit
0819e15db8
  1. 4
      py-i2phosts-builder
  2. 6
      py-i2phosts-checker
  3. 6
      py-i2phosts-fetcher
  4. 6
      py-i2phosts-injector
  5. 6
      py-i2phosts-maint
  6. 4
      py-i2phosts-master

4
py-i2phosts-builder

@ -35,8 +35,8 @@ else: @@ -35,8 +35,8 @@ else:
DJANGO_PROJECT_PATH = os.path.dirname(sys.argv[0]) + '/web'
sys.path.insert(1, DJANGO_PROJECT_PATH)
os.environ['DJANGO_SETTINGS_MODULE'] = DJANGO_SETTINGS_MODULE
from web.postkey.models import i2phost
from web.lib.utils import validate_config
from pyi2phosts.postkey.models import i2phost
from pyi2phosts.lib.utils import validate_config
# validate config
validate_config(config)

6
py-i2phosts-checker

@ -42,9 +42,9 @@ else: @@ -42,9 +42,9 @@ else:
DJANGO_PROJECT_PATH = os.path.dirname(sys.argv[0]) + '/web'
sys.path.insert(1, DJANGO_PROJECT_PATH)
os.environ['DJANGO_SETTINGS_MODULE'] = DJANGO_SETTINGS_MODULE
from web.postkey.models import i2phost
from web.lib.utils import get_logger
from web.lib.utils import validate_config
from pyi2phosts.postkey.models import i2phost
from pyi2phosts.lib.utils import get_logger
from pyi2phosts.lib.utils import validate_config
# validate config
validate_config(config)

6
py-i2phosts-fetcher

@ -41,9 +41,9 @@ else: @@ -41,9 +41,9 @@ else:
DJANGO_PROJECT_PATH = os.path.dirname(sys.argv[0]) + '/web'
sys.path.insert(1, DJANGO_PROJECT_PATH)
os.environ['DJANGO_SETTINGS_MODULE'] = DJANGO_SETTINGS_MODULE
from web.lib.utils import get_logger
from web.lib.utils import validate_config
from web.extsources.models import ExternalSource
from pyi2phosts.lib.utils import get_logger
from pyi2phosts.lib.utils import validate_config
from pyi2phosts.extsources.models import ExternalSource
# validate config
validate_config(config)

6
py-i2phosts-injector

@ -39,9 +39,9 @@ else: @@ -39,9 +39,9 @@ else:
DJANGO_PROJECT_PATH = os.path.dirname(sys.argv[0]) + '/web'
sys.path.insert(1, DJANGO_PROJECT_PATH)
os.environ['DJANGO_SETTINGS_MODULE'] = DJANGO_SETTINGS_MODULE
from web.postkey.models import i2phost
from web.lib.validation import validate_hostname
from web.lib.validation import validate_b64hash
from pyi2phosts.postkey.models import i2phost
from pyi2phosts.lib.validation import validate_hostname
from pyi2phosts.lib.validation import validate_b64hash
# determine approve hosts or not
if args.approve or config.as_bool('approve'):

6
py-i2phosts-maint

@ -43,9 +43,9 @@ else: @@ -43,9 +43,9 @@ else:
DJANGO_PROJECT_PATH = os.path.dirname(sys.argv[0]) + '/web'
sys.path.insert(1, DJANGO_PROJECT_PATH)
os.environ['DJANGO_SETTINGS_MODULE'] = DJANGO_SETTINGS_MODULE
from web.postkey.models import i2phost
from web.lib.utils import get_logger
from web.lib.utils import validate_config
from pyi2phosts.postkey.models import i2phost
from pyi2phosts.lib.utils import get_logger
from pyi2phosts.lib.utils import validate_config
# validate config
validate_config(config)

4
py-i2phosts-master

@ -123,8 +123,8 @@ else: @@ -123,8 +123,8 @@ else:
DJANGO_PROJECT_PATH = os.path.dirname(sys.argv[0]) + '/web'
sys.path.insert(1, DJANGO_PROJECT_PATH)
os.environ['DJANGO_SETTINGS_MODULE'] = DJANGO_SETTINGS_MODULE
from web.lib.utils import get_logger
from web.lib.utils import validate_config
from pyi2phosts.lib.utils import get_logger
from pyi2phosts.lib.utils import validate_config
# validate config
validate_config(config)

Loading…
Cancel
Save