Skip to content

Commit

Permalink
rename message.property module to void naming conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
d-w-moore committed Oct 16, 2024
1 parent 6b0d13d commit a365278
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions irods/message/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,9 @@
import sys
import threading
from irods.message.message import Message
from irods.message.property import (BinaryProperty, StringProperty,
IntegerProperty, LongProperty, ArrayProperty,
SubmessageProperty)

# Unfortunately, the previous import line redefines the "property" attribute within the current
# module; so we'll need to rely on a substitute usage "@_property" from this point forward,
# in place of the otherwise valid decorator usage, "@property".
#
# This was necessitated in PRC 3.0.0 when eliminating dependencies on the "six" module, which
# provided six.moves.builtins.property

_property = sys.modules['__main__'].__builtins__.property
from irods.message.property_types import (BinaryProperty, StringProperty,
IntegerProperty, LongProperty, ArrayProperty,
SubmessageProperty)

class Bad_AVU_Field(ValueError):
pass
Expand Down Expand Up @@ -478,7 +469,7 @@ class PamAuthRequest(Message):
class PamAuthRequestOut(Message):
_name = 'pamAuthRequestOut_PI'
irodsPamPassword = StringProperty()
@_property
@property
def result_(self): return self.irodsPamPassword


Expand Down Expand Up @@ -1100,7 +1091,7 @@ def __init__(self,entry):
self.status_ = entry.status


@_property
@property
def message(self): #return self.raw_msg_.decode(self.Encoding)
msg_ = self.raw_msg_
if type(msg_) is UNICODE:
Expand All @@ -1110,11 +1101,11 @@ def message(self): #return self.raw_msg_.decode(self.Encoding)
else:
raise RuntimeError('bad msg type in',msg_)

@_property
@property
def status(self): return int(self.status_)


@_property
@property
def status_str(self):
"""Retrieve the IRODS error identifier."""
return ex.get_exception_class_by_code( self.status, name_only=True )
Expand Down
File renamed without changes.

0 comments on commit a365278

Please sign in to comment.