Skip to content

Commit 91a082f

Browse files
committed
fix: name exception in get_function_description, after upgrade to 2.7.2, fix #311
Fix NameException: enum_names is not defined in get_function_description, after upgrade to 2.7.2
1 parent 6d65a0a commit 91a082f

File tree

8 files changed

+28328
-6
lines changed

8 files changed

+28328
-6
lines changed

src/pyrfc/client.pyx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -383,11 +383,6 @@ cdef class Connection:
383383

384384
##########################################################################
385385
# HELPER METHODS
386-
def enum_names(enum_obj):
387-
return set(e.name for e in enum_obj)
388-
389-
def enum_values(enum_obj):
390-
return set(e.value for e in enum_obj)
391386

392387
def type_desc_get(self, type_name):
393388
"""Removes the Type Description from SAP NW RFC Lib cache

src/pyrfc/nwrfcsdk.pyx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,12 @@ def set_locale_radix(value=None):
146146
_LOCALE_RADIX = value
147147
return _LOCALE_RADIX
148148

149+
def enum_names(enum_obj):
150+
return set(e.name for e in enum_obj)
151+
152+
def enum_values(enum_obj):
153+
return set(e.value for e in enum_obj)
154+
149155
################################################################################
150156
# CONNECTION PARAMETERS
151157
################################################################################

tests/data/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-FileCopyrightText: 2013 SAP SE Srdjan Boskovic <srdjan.boskovic@sap.com>
2+
#
3+
# SPDX-License-Identifier: Apache-2.0

0 commit comments

Comments
 (0)