File: debug.py

package info (click to toggle)
pithos 1.1.2-1
  • links: PTS
  • area: main
  • in suites: buster, stretch
  • size: 656 kB
  • ctags: 498
  • sloc: python: 3,157; xml: 55; makefile: 12
file content (27 lines) | stat: -rwxr-xr-x 619 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env python3

import os
import sys

# None of this works on Windows atm
if sys.platform != 'win32':

    # Store config locally
    config_dir = os.path.abspath('./config')
    os.environ['XDG_CONFIG_HOME'] = config_dir

    # Migrate old debug_config
    old_config_dir = os.path.abspath('./debug_config')
    if os.path.exists(old_config_dir):
        os.rename(old_config_dir, config_dir)

    if not os.path.exists(config_dir):
        os.makedirs(config_dir)

    # Enable verbose logging and test mode
    if len(sys.argv) == 1:
        sys.argv.append('-tvv')

from pithos import pithos

pithos.main()