Giter VIP home page Giter VIP logo

repoze.filesafe's Introduction

``repoze.filesafe`` README
==========================

repoze.filesafe provides utilities methods to handle creation
of files on the filesystem safely by integrating with the ZODB package's
transaction manager.  It can be used in combination with repoze.tm (or
repoze.tm2) for use in WSGI environments.


See ``docs/index.rst`` for documentation.

repoze.filesafe's People

Contributors

wichert avatar mcdonc avatar fschulze avatar tseaver avatar witsch avatar thapar avatar aodag avatar

Stargazers

Tiberiu Ichim avatar Andrew Mleczko avatar  avatar Jeff Pittman avatar  avatar Yoichi Fujimoto avatar

Watchers

Robert Marianski avatar  avatar  avatar Shane Hathaway avatar James Cloos avatar  avatar

repoze.filesafe's Issues

Permanent ERRNO 18

This is probably me not knowing how to use filesafe but I have been unable to google a good answer and the problem seems easily reproducible:

using Pyramid:

  $ paster pshell test.ini -p python
  Python 2.7.2 (default, Oct 14 2011, 23:34:02) 
  [GCC 4.5.2] on linux2
  Type "help" for more information.

  Environment:
  app          The WSGI application.
  registry     Active Pyramid registry.
  request      Active request object.
  root         Root of the default resource tree.
  root_factory Default root factory used to create `root`.

  Custom Variables:
  mod          smd.models
  s            smd.models.S
  t            transaction

  >>> from repoze.filesafe import create_file
  >>> f = create_file('hello_world', 'wb')
  >>> f.write('hola mundo, esto es una prueba')
  >>> f.close()
  >>> t.commit()
  Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/home/mariano/Code/SmD/env/lib/python2.7/site-packages/transaction/_manager.py", line 89, in commit
     return self.get().commit()
  File "/home/mariano/Code/SmD/env/lib/python2.7/site-packages/transaction/_transaction.py", line 329, in commit
     self._commitResources()
  File "/home/mariano/Code/SmD/env/lib/python2.7/site-packages/transaction/_transaction.py", line 443, in    _commitResources
     rm.commit(self)
  File "/home/mariano/Code/SmD/env/lib/python2.7/site-packages/repoze/filesafe/manager.py", line 90, in commit
     os.rename(info["tempfile"], target)
  OSError: [Errno 18] Invalid cross-device link

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.