Browse Source

helper scripts: import cleanups

The MMGen Project 1 year ago
parent
commit
11ee212fe8
3 changed files with 7 additions and 4 deletions
  1. 3 2
      scripts/compute-file-chksum.py
  2. 3 1
      scripts/create-token.py
  3. 1 1
      scripts/tx-v2-to-v3.py

+ 3 - 2
scripts/compute-file-chksum.py

@@ -4,7 +4,9 @@ import sys,os
 repo_root = os.path.split(os.path.abspath(os.path.dirname(sys.argv[0])))[0]
 sys.path = [repo_root] + sys.path
 
-from mmgen.common import *
+from mmgen.cfg import Config
+from mmgen.util import msg,Msg,make_chksum_6
+from mmgen.fileutil import get_lines_from_file
 
 opts_data = {
 	'text': {
@@ -19,7 +21,6 @@ opts_data = {
 
 cfg = Config(opts_data=opts_data)
 
-from mmgen.fileutil import get_lines_from_file
 lines = get_lines_from_file( cfg, cfg._args[0] )
 start = (1,0)[bool(cfg.include_first_line)]
 a = make_chksum_6(' '.join(lines[start:]).encode())

+ 3 - 1
scripts/create-token.py

@@ -19,7 +19,9 @@
 import sys,os,json,re
 from subprocess import run,PIPE
 from collections import namedtuple
-from mmgen.common import *
+
+from mmgen.cfg import Config
+from mmgen.util import Msg,msg,rmsg,ymsg,die
 
 ti = namedtuple('token_param_info',['default','conversion','test'])
 class TokenData:

+ 1 - 1
scripts/tx-v2-to-v3.py

@@ -7,7 +7,7 @@ import sys,os
 repo_root = os.path.split(os.path.abspath(os.path.dirname(sys.argv[0])))[0]
 sys.path = [repo_root] + sys.path
 
-from mmgen.common import *
+from mmgen.cfg import Config
 
 opts_data = {
 	'text': {