Skip to content

Commit

Permalink
Fix invalid escape sequences
Browse files Browse the repository at this point in the history
.. by doubling backslashes, or making the strings raw, as is commonly
done for regexes.
  • Loading branch information
QuLogic authored and Nick-Hall committed Feb 8, 2024
1 parent d6a9b40 commit 7ae0d1e
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion aio/grampsaioc.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
environ["G_ENABLE_DIAGNOSTIC"] = "0"
environ["G_PARAM_DEPRECATED"] = "0"
environ["GRAMPS_RESOURCES"] = join(aio, "share")
environ["PATH"] = aio + ";" + aio + "\lib;" + environ["PATH"]
environ["PATH"] = aio + ";" + aio + "\\lib;" + environ["PATH"]


def close():
Expand Down
2 changes: 1 addition & 1 deletion aio/grampsaiocd.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
environ["G_ENABLE_DIAGNOSTIC"] = "0"
environ["G_PARAM_DEPRECATED"] = "0"
environ["GRAMPS_RESOURCES"] = join(aio, "share")
environ["PATH"] = aio + ";" + aio + "\lib;" + environ["PATH"]
environ["PATH"] = aio + ";" + aio + "\\lib;" + environ["PATH"]

import gramps.grampsapp as app

Expand Down
2 changes: 1 addition & 1 deletion aio/grampsaiow.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
environ["G_ENABLE_DIAGNOSTIC"] = "0"
environ["G_PARAM_DEPRECATED"] = "0"
environ["GRAMPS_RESOURCES"] = join(aio, "share")
environ["PATH"] = aio + ";" + aio + "\lib;" + environ["PATH"]
environ["PATH"] = aio + ";" + aio + "\\lib;" + environ["PATH"]

import atexit
import ctypes
Expand Down
2 changes: 1 addition & 1 deletion gramps/gen/datehandler/_date_he.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class DateParserHE(DateParser):
bce = [
"לפני הספירה",
"לפני עידן זה",
'לפנה"\ס',
'לפנה"\\ס',
"לפני ספירת הנוצרים",
"לספירתם",
] + DateParser.bce
Expand Down
2 changes: 1 addition & 1 deletion gramps/gen/plug/docgen/treedoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ def write_event(self, db, level, event):
date_str = date_str + "/" + stop_date

place = escape(_pd.display_event(db, event))
place = place.replace("-", "\--")
place = place.replace("-", "\\--")

if modifier:
event_type += "+"
Expand Down
4 changes: 2 additions & 2 deletions gramps/gen/utils/resourcepath.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ class ResourcePath:
The package path will be one of the following:
<prefix>/lib/pythonX.Y/site-packages
<prefix>\Lib\site-packages
<prefix>\\Lib\\site-packages
<home>/lib/python
<userbase>/lib/pythonX.Y/site-packages
<userbase>\PythonXY\site-packages
<userbase>\\PythonXY\\site-packages
Where <prefix>, <home> and <userbase> are the resource paths used in the
Prefix, Home and User installation schemes.
Expand Down

0 comments on commit 7ae0d1e

Please sign in to comment.