Skip to content

Commit 1d73f8e

Browse files
prakashngitcmickeyb
authored andcommitted
fixes for lgtm alerts
Signed-off-by: prakashngit <[email protected]>
1 parent 3f6f52a commit 1d73f8e

File tree

6 files changed

+4
-11
lines changed

6 files changed

+4
-11
lines changed

python/pdo/common/keys.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ def read_transaction_keys_from_file(key_file, search_path, \
5050
else:
5151
raise Exception("Invalid Ledger Type. Must be either 'sawtooth' or 'ccf'")
5252

53+
return txn_keys
54+
5355
# -----------------------------------------------------------------
5456
# -----------------------------------------------------------------
5557
class TransactionKeys(object) :

python/pdo/contract/contract.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
import errno
1616
import json
1717

18-
import pdo.common.crypto as crypto
19-
import pdo.common.keys as keys
2018
import pdo.common.utility as putils
2119

2220
from pdo.submitter.create import create_submitter

python/pdo/service_client/service_data/eservice.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
from pdo.submitter.create import create_submitter
4444
from pdo.service_client.enclave import EnclaveServiceClient
4545
from pdo.common.utility import deprecated
46-
import pdo.common.keys as keys
4746

4847
# -----------------------------------------------------------------
4948
# -----------------------------------------------------------------

python/pdo/submitter/ccf/ccf_submitter.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
import pdo.submitter.ccf.helpers.clients as ccf_helper
2121

22-
import pdo.common.utility as putils
2322
import pdo.common.crypto as crypto
2423
import pdo.common.keys as keys
2524
import pdo.submitter.submitter as sub
@@ -64,7 +63,7 @@ def __init__(self, ledger_config, *args, **kwargs):
6463
_, host_port = self.url.split('//')
6564
self.host, self.port = host_port.split(':')
6665
except Exception as e:
67-
raise("Unable to parse CCF ledger URL. Must be of the form http://ip:port : %s", str(e))
66+
raise Exception("Unable to parse CCF ledger URL. Must be of the form http://ip:port : %s", str(e))
6867

6968
ccf_key_dir = os.environ.get("PDO_LEDGER_KEY_ROOT")
7069
#ensure that ccf keys are present

python/pdo/submitter/sawtooth/helpers/pdo_connect.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
# limitations under the License.
1414

1515
import logging
16-
import hashlib
1716
import time
1817
import requests
1918
import yaml
@@ -22,7 +21,6 @@
2221
import binascii
2322
import warnings
2423
import secp256k1
25-
import urllib
2624

2725
from google.protobuf import json_format
2826
from google.protobuf.json_format import MessageToDict
@@ -44,9 +42,7 @@
4442
PdoContractTransaction,\
4543
PdoContractRegister,\
4644
PdoContractAddEnclaves,\
47-
PdoContractRemoveEnclaves,\
48-
PdoContractEnclavesInfo,\
49-
PdoProvisioningKeyToStateSecretMap
45+
PdoContractRemoveEnclaves
5046

5147
from pdo.submitter.sawtooth.pdo_protos.pdo_contract_ccl_pb2 import\
5248
CCL_ContractState,\

python/pdo/submitter/submitter.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
import json
1616
import logging
17-
import os
1817
from abc import ABCMeta, abstractmethod
1918

2019
logger = logging.getLogger(__name__)

0 commit comments

Comments
 (0)