~shnatsel/apport/fix-1023912

« back to all changes in this revision

Viewing changes to apport/fileutils.py

  • Committer: Martin Pitt
  • Date: 2012-12-05 10:07:42 UTC
  • Revision ID: martin.pitt@canonical.com-20121205100742-85kn6ubyt9hbsxy9
* fileutils.py, mark_report_upload(): Do not try to remove the .uploaded file, as this is not owned by the user.

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
    if os.path.exists(uploaded) and os.path.exists(upload):
111
111
        report_st = os.stat(report)
112
112
        upload_st = os.stat(upload)
113
 
        uploaded_st = os.stat(uploaded)
114
113
        if upload_st.st_mtime < report_st.st_mtime:
115
114
            os.unlink(upload)
116
 
        if uploaded_st.st_mtime < report_st.st_mtime:
117
 
            os.unlink(uploaded)
118
115
    with open(upload, 'a'):
119
116
        pass
120
117