[PATCH] Remove bogus \o escape in regex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



One of the regexes has a bogus \o instead of plain 'o'. Somehow
this magically worked on all versions of python, until 3.6 came
along and complained

Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
---
 generator.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Pushed as a trival fix / python 3.6 build fix

diff --git a/generator.py b/generator.py
index 730e456..2c3b667 100755
--- a/generator.py
+++ b/generator.py
@@ -1091,7 +1091,7 @@ def is_integral_type (name):
     return not re.search ("^(unsigned)? ?(int|long)$", name) is None
 
 def is_optional_arg(info):
-    return re.search("^\(?\optional\)?", info) is not None
+    return re.search("^\(?optional\)?", info) is not None
 # Functions returning lists which need special rules to check for errors
 # and raise exceptions.
 functions_list_exception_test = {
-- 
2.9.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux