Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c9776bd

Browse files
committed
Use tempfile.gettempdir() to get the temp directory rather than
hardcoding "/tmp".
1 parent b390315 commit c9776bd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Demo/cgi/wiki.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Wiki main program. Imported and run by cgi3.py."""
22

3-
import os, re, cgi, sys
3+
import os, re, cgi, sys, tempfile
44
escape = cgi.escape
55

66
def main():
@@ -16,7 +16,7 @@ def main():
1616

1717
class WikiPage:
1818

19-
homedir = "/tmp"
19+
homedir = tempfile.gettempdir()
2020
scripturl = os.path.basename(sys.argv[0])
2121

2222
def __init__(self, name):

0 commit comments

Comments
 (0)