Remove the warnings:
repository/__init__.py:66:12: W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)
repository/__init__.py:74:12: W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)
Variable bk is renamed to bkend to avoid this pylint warning:
repository/LocalStatus.py:88:12: C0103: Variable name "bk" doesn't conform to snake_case naming style (invalid-name)
The function sync_folder_structure is only used in the accounts.py file:
kix@inle:~/src/offlineimap3/offlineimap$ rgrep sync_folder_structure *
accounts.py: remoterepos.sync_folder_structure(localrepos, statusrepos)
repository/Base.py: def sync_folder_structure(self, local_repo, status_repo):
kix@inle:~/src/offlineimap3/offlineimap$
The returned value is not used. We have this warning:
R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
Because is not returning anything here, but is returning None at the function end.
We can include this None here safely.
First, in Python 3 we don't need call the super().__init__ explicitly, because Python does it. So, we can remove the line:
super().__init__(reposname, account)
If we leafe the method __init__ empty, the parent __init__ method is not called, we need remove the __init__ and then Python uses the parent __init__ method.
This patch includes a new functionality to get the sslcacertfile.
With this patch is possible to remove the sslcacertfile variable form the
.offlineimaprc and use the system's default. This could be easy for new users.
With this patch, the user can use ssl without the sslcacertfile option
in .offlineimaprc, use sslcacertfile = <empty> (no include anything
after the equal sign, os specify the sslcacertfile as previosly.
Currently, these are the options:
User specifies sslacertfile -> OK
User specifies sslacertfile=OS-DEFAULT
If the system's default is provided -> OK
If the system's default is not provided -> Fail
User do not specifies sslacertfile -> Fail
User specifies empty sslacertfile -> Fail
With the new option (this patch).
User specifies sslacertfile -> OK
User specifies sslacertfile=OS-DEFAULT or
User do not specifies sslacertfile or
User specifies empty sslacertfile
If the system's default is provided -> OK
If the system's default is not provided -> Fail
Closes#14
The file utils/distro.py is renamed to utils/distro_utils.py
because we need import the distro file to update some calls.
The file is used in IMAP.py, I need change the import.
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>
In the patch "IMAP list folders" we updated the function getselectors
to return '""'. We use this variable in the folders, but also here.
Because the variable is never '', we need update it with this change, to
test that the variable has value, but is not empty.
Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
This patch changes the refernce to "", because now the empty string
is not saved as '""', is just '', so the fecth command fails.
Then, I changed the fech call to "" "*", using refernce "" and pattern
"*".