Commit Graph

20 Commits

Author SHA1 Message Date
Rodolfo García Peñas (kix)
0c04611ca4 Changed doxygen parameter
The parameter regtype does not exists, it is reqtype.
2020-10-10 17:48:30 +02:00
Rodolfo García Peñas (kix)
7fff7fc458 repository/__init__.py remove try import python2
This patch removes the dup code between try and catch

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2020-09-03 21:36:10 +02:00
Rodolfo García Peñas (kix)
35b588f57e six: changed offlineimap/repository/__init__.py
This patch removes the library six, compatible with python2.

I need change these re-raise calls.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2020-09-03 21:36:05 +02:00
Rodolfo García Peñas (kix)
2248a85f64 repository/__init__.py Removed unused variable
This variable is not used.
2020-08-30 14:13:27 +02:00
Rodolfo García Peñas (kix)
e496525b8b repository/__init__.py Removed extra chars
These parenthesis are not needed.
2020-08-30 14:12:35 +02:00
Rodolfo García Peñas (kix)
e77440552c Do not make object inheritance
This patch removes these lintian warnings:

Warning R0205: Class 'X' inherits from object,
can be safely removed from bases in python3 (useless-object-inheritance)
2020-08-29 21:44:18 +02:00
Rodolfo García Peñas (kix)
7d62441dc2 Changed import order
These changes close the lintian warning C0411.
2020-08-29 21:10:16 +02:00
Rodolfo García Peñas (kix)
b64430e035 Reformat offlineimap/repository/__init__.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:48:41 +02:00
Rodolfo García Peñas (kix)
6ec6111896 2to3 main 2020-08-28 03:32:43 +02:00
Nicolas Sebrecht
7945e10a76 correctly reraise errors with six
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-07-03 19:56:14 +02:00
Łukasz Żarnowiecki
0addcbabf0 py3: raise exceptions using six module
There is no other way to make Python2 and Python3 happy, because syntax
raise E, V, T is incompatible with the latter.

Signed-off-by: Łukasz Żarnowiecki <dolohow@outlook.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-05-18 01:49:09 +02:00
Nicolas Sebrecht
461554b7b1 more style consistency
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-02-10 17:25:00 +01:00
Nicolas Sebrecht
cb6790b804 minor: fix indentation
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-01-18 21:52:09 +01:00
Eygene Ryabinkin
e7fabf9e57 Properly re-raise exception to save original tracebacks
We usually mutate some exceptions to OfflineImapError() and it is
a whole lot better if such exception will show up with the original
traceback, so all valid occurrences of such mutations were transformed
to the 3-tuple form of "raise".  Had also added coding guidelines
document where this re-raise strategy is documented.

Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
2015-01-12 17:51:21 +03:00
Abdó Roig-Maranges
0e4afa9132 Make GmailFolder sync GMail labels
When synclabels config flag is set to "yes" for the GMail repo,
offlineimap fetches the message labels along with the messages, and
embeds them into the body under the header X-Keywords (or whatever
'labelsheader' was set to), as a comma separated list.

It also adds an extra pass to savemessageto, that performs label
synchronization on existing messages from GMail to local, the same way
it is done with flags.

We also introduce GmailMaildir repository that adds functionality to
change message labels.  It keeps track of messages modification time,
so one can quickly detect when the labels may have changed.

Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
2014-05-06 23:36:06 +04:00
Sebastian Spaeth
103524c979 Throw OfflineImapErrors rather than weird Exceptions
When misconfiguring OLI, e.g. by specifying a repository name that was
not configured anywhere, we would bomb out with cryptic "NoSectionError".
Throw OfflineImapError that explains what has happened. We still need to
avoid throwing exceptions with Tracebacks here though.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2012-08-31 20:31:43 +02:00
Sebastian Spaeth
c5468ae599 raise Exception, "text" --> raise Exception("text")
To have the code work in python3, we need to convert all occurences of

raise Exception, "text" to be proper functions. This style also adheres to PEP8.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2012-02-06 17:41:42 +01:00
Sebastian Spaeth
d5e7620ce9 Create an abstract Repository class
A Repository() returns the correctly instanciated dervivate of a
BaseRepository, depending on the parameters passed to it. The returned
instance is eg an ImapRepository(). This makes the code look nicer,
and we have less functions lying around outside of classes (no more
global LoadRepository() function).

This will also enable us to conveniently hand back a
LocalStatusRepository based on SQLITE rather than plain text, if the
user configures this to be the experimental and optional backend
(once it exists).

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2011-03-03 18:19:42 +01:00
Riccardo Murri
81b86fb74c Add Gmail IMAP special support.
New repository/folder classes to support "real deletion" of messages
thorugh Gmail's IMAP interface: to really delete a message in Gmail,
one has to move it to the Trash folder, rather than EXPUNGE it.
2008-01-03 04:56:55 +01:00
John Goerzen
d839be3c61 Step 2 of SVN to arch tree conversion 2005-04-16 20:33:35 +01:00