Skip to content

test-client: fix python2 f-string compatibility issue

Wen Liang requested to merge wl/python2_f_string_fix into main

Summary

test-client: fix python2 f-string compatibility issue

Purpose

f-string is not supported in python2, and the autotool build complains
about it as follows:
```
  LIBTOOL="/bin/sh ./libtool" "../src/tests/client/test-client.sh" "." ".." "python2" -- TestNmCloudSetup
    File "/builds/NetworkManager/NetworkManager/src/tests/client/test-client.py", line 722
      return f"{major}.{minor}.{micro}"
                                      ^
  SyntaxError: invalid syntax
  test-client.py failed!!
  make[3]: *** [check-local-tests-client] Error 1
    File "/builds/NetworkManager/NetworkManager/src/tests/client/test-client.py", line 722
      return f"{major}.{minor}.{micro}"
                                      ^
  SyntaxError: invalid syntax
  test-client.py failed!!
```

Checklist

Please read https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CONTRIBUTING.md before opening the merge request. In particular, check that:

  • the subject for all commits is concise and explicative
  • the message for all commits explains the reason for the change
  • the source is properly formatted
  • any relevant documentation is up to date
  • you have added unit tests if applicable
Edited by Wen Liang

Merge request reports