Skip to content

Commit

Permalink
cleanign up errors I entered into the code and clean up logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Owen Synge committed May 5, 2014
1 parent 6e6c88b commit 48a4015
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions vmcatcher/vmcatcher_subscribe/fatcontroler.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,10 @@ def setEventObj(self,obj):
def subscribe_file(self,Session,inmetadata):
metadata_retriver = {}
metadata = {}
autoEndorse = False
if 'autoEndorse' in inmetadata:
metadata["autoEndorse"] = inmetadata["autoEndorse"]

autoEndorse = True
if 'filename' in inmetadata:
metadata["uri"] = inmetadata["filename"]
if 'trustAnchor' in inmetadata:
Expand All @@ -337,13 +338,6 @@ def subscribe_file(self,Session,inmetadata):
elif 'username' in inmetadata:
metadata["userName"] = inmetadata["username"]
metadata[u'il.transfer.protocol:userName'] = inmetadata["username"]
else:
self.log.error("username=%s" % (None) )





if 'password' in inmetadata:
metadata["password"] = inmetadata["password"]
metadata[u'il.transfer.protocol:password'] = inmetadata["password"]
Expand Down Expand Up @@ -406,10 +400,10 @@ def subscribe_file(self,Session,inmetadata):
if metadata[u'hv:ca'] != smimeProcessor.InputCertMetaDataList[0]['issuer']:
self.log.error('list hv:ca does not match signature')
return False
if uriNormaliseAnonymous(metadata[u'hv:uri']) != uriNormaliseAnonymous(resultDict["uri"]):
self.log.warning('list hv:uri does not match subscription uri')
self.log.info('hv:uri=%s' % (metadata[u'hv:uri']))
self.log.info('subscription uri=%s' % (resultDict['uri']))
#if uriNormaliseAnonymous(metadata[u'hv:uri']) != uriNormaliseAnonymous(resultDict["uri"]):
# self.log.warning('list hv:uri does not match subscription uri')
# self.log.info('hv:uri=%s' % (metadata[u'hv:uri']))
# self.log.info('subscription uri=%s' % (resultDict['uri']))
db = db_actions(Session)
endorser_list = db.endorser_get(metadata)
if endorser_list.count() == 0:
Expand Down

0 comments on commit 48a4015

Please sign in to comment.