Op Vr, 2012-02-10 om 16:04 -0800 skryf Chris Fulton:
> Hello,
> 
> I am new here. I need my .po files to have certain permissions, specifically 
> 664 and not 600. Because savestore() uses tempfile.mkstemp and shutil.move I 
> will always get 600 regardless of my umask.
> 
> Here is the fix:
> 
> --- local_apps/pootle_store/fields.py   2012-02-10 15:59:03.698008000 -0800
> +++ local_apps/pootle_store/fields.py.new       2012-02-10 15:58:41.760740000 
> -0800
> @@ -200,7 +200,8 @@
>          tmpfile, tmpfilename = tempfile.mkstemp(suffix=self.filename)
>          os.close(tmpfile)
>          self.store.savefile(tmpfilename)
> -        shutil.move(tmpfilename, self.realpath)
> +        shutil.copyfile(tmpfilename, self.realpath)
> +        os.remove(tmpfilename)
>          self._touch_store_cache()
> 
>      def save(self, name, content, save=True):
> 
> 
> If you like it, please adopt it, or I would be happy to commit it to svn.


Hi Chris

I believe the issue has been described in this bug report:
http://bugs.locamotion.org/show_bug.cgi?id=1983

There is a patch in there that has already been committed for the
upcoming version of Pootle, so that may be ready for you to adopt.
Please add any feedback you might have in the bug.

Friedel

-- 
Recently on my blog:
http://translate.org.za/blogs/friedel/en/content/survey-about-usability-virtaal


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle

Reply via email to