| Commit message (Collapse) | Author | Age |
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
That is a normal situation, just log an info message.
Raise an exception when the hooks file exists but cannot be loaded.
|
|
|
|
|
|
|
|
| |
It just adds unnecessary type confusion.
In most places where it is used, the types are always str, so it does
nothing. In the few others, the encoding/decoding is better handled
explicitly.
|
|
|
|
| |
Also, drop now-unnecessary call to decode_string
|
| |
|
| |
|
|
|
|
|
|
| |
Python3 only supports "new-style" classes (those extending object),
and we don't need to explicitly inherit from this root class any more.
See http://pylint-messages.wikidot.com/messages:c1001
|
| |
|
|
|
|
|
| |
... since accounts' addresses can overlap and get_account_by_address
promises too much. Also remove now-obsolete get_addresses.
|
|
|
|
| |
fixes #1230, fixes an unfiled bug in clear_my_address()
|
|
|
|
|
|
|
|
|
| |
This prevents SettingsManager from reading the config files right when
it is isntantiated and instead waits for the main module to call
`read_[notmuch]config` with the right path.
This should prevent problems with accidentally reading the default
config paths despite being told otherwise (via commandline options)
|
|\ |
|
| |
| |
| |
| | |
imp is deprecated in favor of importlib.
|
|/
|
|
| |
They are not needed for python >= 3.0.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The typical current message looks like:
unable to load hooks file:/home/teto/.config/alot/hooks.py
without telling why python couldn't load the hook.
This commit prints the exception, thus helping users to solve the issue
(in my case encoding + wrong imports).
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
- allows users to use $XDG_CONFIG_HOME, as well
- stores information in single places.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use fallback, if an enviroment variable is unset *or* empty.
Bug:
- XDG_CONFIG_HOME='' alot
Problem:
Does not find the configuration file (among others), because
os.environ.get('XDG_CONFIG_HOME', '~/.config') returns '', instead of
'~/.config'.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Replace directory check with file check - we only check for a single
file, no need to check for existende of the directory separately. Also,
this way we can distinguish between file validation error and file
not found.
- Be consistent: we stop iterating, if we find a file and it can be
parsed. If we can't parse it, stop iterating as well, don't keep looking
for the file.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes the following crashes:
1. tag completion with regex special chars
:search tag:[<tab>
2. Changing tag representation of an (existing) tag with regex special
chars:
[tags]
[[my**tag]]
normal = '','', 'white','light red', 'white','#d66'
3. Contact completion with regex special chars and no external command:
To:**foo<tab>
|
|\ |
|
| |
| |
| |
| |
| | |
This mostly shortens lines down to <=79 chars and fixes some other small
things I found using the pep8 tool.
|
|/ |
|
|
|
|
|
|
| |
In python3 Exception doesn't have a message attribute, the only way to
get the string output is to call str() on the Exception. This also works
in python 2.7, so go ahead and make that change.
|
|\
| |
| | |
Load default settings even if a user config doesn't exist
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is necessary even if the config file is None to ensure that the
spec file is loaded
Also mock out the setting.const module in the docs, otherwise they'll
fail to generate.
Fixes #1094
|
| |
| |
| |
| |
| | |
SettingsManager sets it's _config attribute to the exact same value
twice in the constructor. This is wrong.
|
|/
|
|
|
| |
This allows to simply pass the content of a messages' From-header value
when determining an account to send/save/encrypt from.
|
|
|
|
|
|
|
| |
This can create circular imports in unittests, which causes difficult to
debug errors.
Fixes #1076
|
|\
| |
| | |
commands/envelope: Fall back to account for signing key
|
| |
| |
| |
| |
| |
| | |
This new return_default flag (which is an optional and default to
False) will try to return the default account if it cannot find an
account matching the address hint.
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
This adds additional system locations to search for theme files, which
are either defined as the environment variable XDG_DATA_DIRS, or the
generic fallback (per the xdg base directories spec) as
/usr/local/share and /usr/share. We then add alot/themees to those paths
to search for themes in. This allows a package manager to install the
theme files system wide along with alot, and for alot to load them from
the system wide directories.
The Archlinux alot-git package is already installing the packages like
this.
|
|
|
|
|
|
|
|
|
|
|
| |
This patch does a bit of refactoring to the Settings class for it's
setup, and adds a reload method. The refactoring encapsulates the
handling of NoneType for the read_*config methods, and reworks the
constructor just a bit so that it doesn't rely on calling methods to
create instance variables.
The end result is slightly cleaner, and will be useful for adding a
reload command to alot itself.
|
|
|
|
|
| |
The argument is handed to ConfigObj directly and allowing lines of text
to be passed here makes future tests much easier.
|