Skip to content

web.utils.safewrite throws global name 'path' is not defined exception #95

@ghost

Description

https://github.com/webpy/webpy/blob/master/web/utils.py#L718

call function safewrite, it will throws following exception

global name 'path' is not defined

patch

--- utils.py    2011-09-09 00:00:08.000000000 +0800
+++ utils.py.new    2011-09-09 00:00:21.000000000 +0800
@@ -715,7 +715,7 @@
     f = file(filename + '.tmp', 'w')
     f.write(content)
     f.close()
-    os.rename(f.name, path)
+    os.rename(f.name, filename)

 def dictreverse(mapping):
     """

version 0.36

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions