Skip to content

Commit

Permalink
bugfix for android volta.Phones -> phones
Browse files Browse the repository at this point in the history
  • Loading branch information
Timur Torubarov committed May 23, 2017
1 parent c6c7617 commit 2eac568
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion volta/Phones/android.py
Expand Up @@ -64,7 +64,7 @@ def __init__(self, config):
self.unplug_type = config.get('unplug_type', 'manual')
# lightning app configuration
self.lightning_apk_path = config.get('lightning', pkg_resources.resource_filename(
'volta.Phones', 'binary/lightning-new3.apk')
'volta.phones', 'binary/lightning-new3.apk')
)
self.lightning_apk_class = config.get('lightning_class', 'net.yandex.overload.lightning')
self.lightning_apk_fname = None
Expand Down
29 changes: 29 additions & 0 deletions volta/core/postloader.py
@@ -0,0 +1,29 @@
import logging
import yaml
import pandas as pd


logger = logging.getLogger(__name__)


def main():
import argparse
parser = argparse.ArgumentParser(description='volta console post-loader')
parser.add_argument('--debug', dest='debug', action='store_true', default=False)
parser.add_argument('-c', '--config', dest='config')
args = parser.parse_args()

logging.basicConfig(
level="DEBUG" if args.debug else "INFO",
format='%(asctime)s [%(levelname)s] [Volta Post-loader] %(filename)s:%(lineno)d %(message)s')

if not args.config:
raise RuntimeError('Empty config')
with open(args.config, 'r') as cfg:
cfg_data = cfg.read()
try:
cfg_dict = yaml.safe_load(cfg_data)
except:
logger.debug('Config file format not yaml or json...', exc_info=True)
raise RuntimeError('Unknown config file format. Malformed?')

0 comments on commit 2eac568

Please sign in to comment.