Menu

#3351 pyosaf: python3 SaStringT compare with str alway fail

5.25.04
fixed
None
defect
pyosaf
lib
major
False
2025-04-26
2024-04-19
No

using ping-pong samples and reproduce with python3

def print_admin_operation_info(dn, params):
    """ Print admin operation information """
    print("INFO: I am %s" % dn)

    if params:
        print("INFO: Received parameters")

        for param in params:
            if param.name == "testing":
                # condition is pass if run with python2
                print("pass")
            print("\t- %s: %s (%s)" % (param.name, param.value, param.type))

Related

Wiki: ChangeLog-5.25.04

Discussion

  • Thien Minh Huynh

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -10,7 +10,7 @@
    
             for param in params:
                 if param.name == "testing":
    -                    # condition is pass if run with python2
    -                    print("pass")
    +                # condition is pass if run with python2
    +                print("pass")
                 print("\t- %s: %s (%s)" % (param.name, param.value, param.type))
     ~~~
    
     
  • Thien Minh Huynh

    • status: accepted --> review
     
  • Thien Minh Huynh

    • status: review --> fixed
     
  • Thien Minh Huynh

    commit 321e1d9eeac01d5259c73c88cea56e34462ebe8e (HEAD -> develop, origin/develop, ticket-3351)
    Author: thien.m.huynh thien.m.huynh@dektech.com.au
    Date: Tue Apr 23 10:16:38 2024 +0700

    pyosaf: Allow SaStringT compare with str by default [#3351]
    
    An earlier patch supporting Python 3 introduced the SaStringT class.
    With str type, default SaStringT cannot be compared.
    
    This commit is to allow compare with str class if without casting
    
     
  • Gary Lee

    Gary Lee - 2025-04-26
    • Milestone: 5.25.03 --> 5.25.04
     

Log in to post a comment.

MongoDB Logo MongoDB