Yann Leboulanger pushed to branch master at gajim / gajim
Commits: 03446bb7 by Emmanuel Gil Peyrot at 2017-01-01T21:48:44+00:00 Make sure strings don’t contain unescaped backslashes.
- - - - - 5716efde by Yann Leboulanger at 2017-01-01T22:50:51+01:00 Merge branch 'fix-backslashes' into 'master'
Make sure strings don’t contain unescaped backslashes
See merge request !15 - - - - -
3 changed files:
- src/common/helpers.py - src/gui_interface.py - src/plugins/pluginmanager.py
Changes:
===================================== src/common/helpers.py ===================================== --- a/src/common/helpers.py +++ b/src/common/helpers.py @@ -459,7 +459,7 @@ def get_output_of_command(command): return output
def get_windows_reg_env(varname, default=''): - """ + r""" Ask for paths commonly used but not exposed as ENVs in english Windows 2003 those are: 'AppData' = %USERPROFILE%\Application Data (also an ENV)
===================================== src/gui_interface.py ===================================== --- a/src/gui_interface.py +++ b/src/gui_interface.py @@ -1943,9 +1943,9 @@ class Interface: # We match from our list of emoticons, but they must either have # whitespace, or another emoticon next to it to match successfully # [\w.] alphanumeric and dot (for not matching 8) in (2.8)) - emoticons_pattern = '|' + '(?:(?<![\w.]' + \ + emoticons_pattern = '|' + r'(?:(?<![\w.]' + \ emoticons_pattern_prematch[:-1] + '))' + '(?:' + \ - emoticons_pattern[:-1] + ')' + '(?:(?![\w]' + \ + emoticons_pattern[:-1] + ')' + r'(?:(?![\w]' + \ emoticons_pattern_postmatch[:-1] + '))'
# because emoticons match later (in the string) they need to be after
===================================== src/plugins/pluginmanager.py ===================================== --- a/src/plugins/pluginmanager.py +++ b/src/plugins/pluginmanager.py @@ -404,7 +404,7 @@ class PluginManager(metaclass=Singleton): @staticmethod @log_calls('PluginManager') def scan_dir_for_plugins(path, scan_dirs=True): - ''' + r''' Scans given directory for plugin classes.
:param path: directory to scan for plugins
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/4bc6f19f198e3f012a12a2a01f86d483ea...