#50591 Do not use comparision with "is" for empty value
Closed 3 years ago by spichugi. Opened 4 years ago by tdudlak.
tdudlak/389-ds-base rawhide-comparision  into  master

@@ -145,7 +145,7 @@ 

              TZ=timedata['tz'],

              )

          dt = dt_parse(dt_str)

-         if timedata['nanosecond'] is not '':

+         if timedata['nanosecond']:

              dt = dt.replace(microsecond=int(int(timedata['nanosecond']) / 1000))

          return dt

  

There is a warning with python 3.8 at fedora rawhide about
comparision with "is" while running ipa-server install:
dirsrv_log.py:148: SyntaxWarning: "is not" with a literal. Did you mean "!="
Removing "is not ''" as this should not be needed
to make sure that timedata['nanosecond'] is empty.

Signed-off-by: Tibor Dudlák tdudlak@redhat.com

  [1/44]: creating directory server instance

Starting installation...
/usr/lib/python3.8/site-packages/lib389/dirsrv_log.py:148: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if timedata['nanosecond'] is not '':
Created symlink /etc/systemd/system/multi-user.target.wants/dirsrv@EXAMPLE-TEST.service → /usr/lib/systemd/system/dirsrv@.service.

LGTM. I'll merge it..

Pull-Request has been merged by mreynolds

4 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/3647

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

3 years ago
Metadata