Uploaded image for project: 'mod_python'
  1. mod_python
  2. MODPYTHON-7

Autoreload works if mtime is newer, but not older.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.1.3
    • 3.2.7
    • None
    • None

    Description

      The apache.import_module() method only reloads a Python module if the modification time of the file on disk is newer. This means that if one restores an old version of a file from backup, eg., by using "mv" command from another location, it will not reload it and it is necessary to touch the file or restart Apache.

      The check in apache.py, instead of being just:

      if mtime > oldmtime:

      could perhaps be:

      if mtime != oldmtime:

      I don't believe this would cause any wider issues, but might be due some thought first.

      The various settings of mtime and oldmtime above that in the code, ie., to 0 or 1, will also have to be reviewed to ensure this change doesn't break anything.

      Attachments

        Activity

          People

            nlehuen Nicolas Lehuen
            grahamd Graham Phillip Dumpleton
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: