Skip to content

Commit

Permalink
Fix missing exception import for twisted
Browse files Browse the repository at this point in the history
Signed-off-by: Mic Bowman <[email protected]>
  • Loading branch information
cmickeyb authored and prakashngit committed May 25, 2024
1 parent c2f2165 commit 6a30f64
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions eservice/pdo/eservice/scripts/EServiceCLI.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
from twisted.internet import reactor, defer
from twisted.internet.endpoints import TCP4ServerEndpoint
from twisted.web.wsgi import WSGIResource
from twisted.internet.error import ReactorNotRunning

## ----------------------------------------------------------------
def ErrorResponse(request, error_code, msg) :
Expand Down
8 changes: 3 additions & 5 deletions pservice/pdo/pservice/scripts/PServiceCLI.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import pdo.common.utility as putils

import pdo.pservice.pdo_helper as pdo_enclave_helper
import pdo.pservice.pdo_enclave as pdo_enclave

import logging
logger = logging.getLogger(__name__)
Expand All @@ -46,9 +45,7 @@
from twisted.web import server, resource, http
from twisted.internet import reactor, defer
from twisted.web.error import Error

import base64

from twisted.internet.error import ReactorNotRunning

## XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
## XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Expand Down Expand Up @@ -180,7 +177,8 @@ def _secretreq(self, minfo) :
logger.debug("Expected public key: %s", opk)
assert contract_info['pdo_contract_creator_pem_key'] == opk
except :
logger.error('request to create secret did not come from the contract owner; %s != %s', contracttxn.OriginatorID, opk)
logger.error('request to create secret did not come from the contract owner; %s != %s',
contract_info['pdo_contract_creator_pem_key'], opk)
raise Error(http.NOT_ALLOWED, 'operation not allowed for {0}'.format(opk))

# make sure the provisioning service is allowed to access contract by the checking the list of allowed provisioning services
Expand Down
1 change: 1 addition & 0 deletions sservice/pdo/sservice/scripts/SServiceCLI.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
from twisted.internet import reactor, defer, task
from twisted.internet.endpoints import TCP4ServerEndpoint
from twisted.web.wsgi import WSGIResource
from twisted.internet.error import ReactorNotRunning

## ----------------------------------------------------------------
def ErrorResponse(request, error_code, msg) :
Expand Down

0 comments on commit 6a30f64

Please sign in to comment.