Commit Graph

406 Commits

Author SHA1 Message Date
Stein Magnus Jodal
b754885064 Fix all import order warnings 2014-05-07 20:08:43 +02:00
Trygve Aaberge
d62ad966af network: Respond to messages before closing connections
This makes a connection tell the actor to stop the connection, instead
of stopping it itself. This is preferable, because other messages sent
to the actor that is not processed yet, may now send data to the client.

E.g. it makes this work:
$ echo status | nc localhost 6600
2014-04-25 06:11:01 +02:00
Stein Magnus Jodal
5583ca5aba New flake8 version with new checks to conform to 2014-03-29 20:47:42 +01:00
Stein Magnus Jodal
db7aff4512 utils: Tweak docstrings from PR#707 2014-03-02 09:00:47 +01:00
Thomas Adamcik
7386dd30b6 utils: Remove old find_files 2014-02-26 23:53:12 +01:00
Thomas Adamcik
5b7a6065e7 util: Add find_mtimes helper 2014-02-26 23:27:44 +01:00
Thomas Adamcik
4e332da3ed utils: Update find to be threaded.
This is needed to speedup searches when using network mounted directories where
we are heavily IO bound.
2014-02-26 23:10:08 +01:00
Stein Magnus Jodal
5551d09e3e log: Switch to debug format if loglevels has any debug levels 2014-02-07 01:06:22 +01:00
Stein Magnus Jodal
1ef1116583 log: Fix error if no loglevels exists 2014-02-07 00:51:44 +01:00
Stein Magnus Jodal
00f1259683 log: Remove redundant code 2014-02-06 23:21:06 +01:00
Thomas Adamcik
40cadbfa26 Fix increasing of verbosity using loglevels config 2014-02-06 23:18:25 +01:00
Thomas Adamcik
4453df7594 network: Check for windows platform match 2014-01-24 19:18:30 +01:00
Thomas Adamcik
246e8e3ef8 Merge remote-tracking branch 'abarisain/window' into develop 2014-01-24 19:18:20 +01:00
Stein Magnus Jodal
7d2906d58d log: Make other logging work when logging/config_file is in use 2014-01-23 22:49:41 +01:00
Stein Magnus Jodal
06640f1f0c log: Use custom filter to implement verbosity levels
...instead of hooking handlers onto multiple loggers with disabled propagation
from those loggers to parent loggers, breaking alternative log methods, like
custom setups through the the logging/config_file config value.

Fixes #661
2014-01-23 22:49:41 +01:00
Stein Magnus Jodal
bb66cd1065 log: Don't filter anything at all on the root logger itself 2014-01-23 22:34:23 +01:00
Arnaud Barisain-Monrose
fe3c27cf18 Add windows workaround for IPv6 sockets to also listen on IPv4 2014-01-19 23:05:00 +01:00
Stein Magnus Jodal
550f7a971b log: Add verbosity_level 2 and 3
Reduces the amount of dependency logging on level 1, and increases the amount
on level 2 and 3. Fixes #593.
2014-01-12 01:46:49 +01:00
Stein Magnus Jodal
0fb7c79524 log: Use loggers named after __name__ 2014-01-01 13:31:20 +01:00
Stein Magnus Jodal
12d473ced6 zeroconf: Make public API with docs 2013-12-29 15:38:20 +01:00
Thomas Adamcik
603b57ef3c utils: Remove find_uris and update find_files
- find_uris is no more
- find_files now returns file paths relative to path being searched
- find_files now only works on directories
- find_files tests have been updated to reflect changes
- local scanner has gotten a minimal update to reflect this alteration
2013-11-27 22:50:35 +01:00
Thomas Adamcik
b22d7bee0b utils: Add mkdir and content options to get_or_create_file
This lets callers control is parent directories are created, and set the
default content of the file.
2013-11-22 07:17:02 +01:00
Stein Magnus Jodal
c781d75985 zeroconf: Avahi doesn't support announcing on the loopback interface 2013-11-19 20:52:53 +01:00
Thomas Adamcik
ea28e91f63 Merge branch 'develop' into feature/subcommands
Conflicts:
	mopidy/scanner.py
2013-11-16 03:08:38 +01:00
Thomas Adamcik
03c301705d commands: Move mopidy.utils.command to mopidy.commands
- Also adds documenation to Command class.
- Moves scan command to commands to match naming.
2013-11-16 03:02:45 +01:00
Thomas Adamcik
2f6ecd9171 commands: Move to using a help attribute instead of __doc__ 2013-11-16 02:26:47 +01:00
Stein Magnus Jodal
eee276d8c0 zeroconf: Wrap unpublish in try-except 2013-11-16 01:28:53 +01:00
Stein Magnus Jodal
34e327ed12 zeroconf: Wrap publish in try-except 2013-11-16 01:28:44 +01:00
Stein Magnus Jodal
5c33115eeb zeroconf: Don't set host when binding to all interfaces 2013-11-16 01:07:16 +01:00
Stein Magnus Jodal
f3b09e4ef2 zeroconf: Catch DBusException from AddService
Fixes #576
2013-11-16 01:06:57 +01:00
Stein Magnus Jodal
9814fe1ec9 zeroconf: Fix logger name 2013-11-16 00:20:26 +01:00
Thomas Adamcik
37ba3ca01d Merge branch 'develop' into feature/commands-helper-tmp
Conflicts:
	mopidy/utils/log.py
2013-11-14 23:36:27 +01:00
Thomas Adamcik
c0f1a1352b commands: Replace set_defaults with set method
For our use case we only need to be able to override a value, not set defaults
so this simplifies everything.
2013-11-14 23:31:20 +01:00
Thomas Adamcik
39f7fd5955 commands: Extend use of exit helper to parser errors
This moves all the bad arugment handling into our class and makes sure to mark
all the helpers as internal.
2013-11-14 23:31:20 +01:00
Thomas Adamcik
d82f48a42f commands: Internalise handling of help action
This means help will always be handled by the root command. Additionally this
adds an exit helper.
2013-11-14 23:31:20 +01:00
Thomas Adamcik
0b1b249ae8 commands: Remove trailing newline for command errors 2013-11-14 23:31:20 +01:00
Thomas Adamcik
1394f3929b commands: Add run method to Commands 2013-11-14 23:31:20 +01:00
Thomas Adamcik
f5a5f9e9b1 commands: Add str method CommandError 2013-11-14 23:31:20 +01:00
Thomas Adamcik
b5360a1360 commands: Add usage to CommandError 2013-11-14 23:31:20 +01:00
Thomas Adamcik
001c8e0bdc commands: Add set_defaults() to the parser
- Removes mock based test that checks delegation, just check commands result
- Allow setting of defaults that propegate down the chain
- Move internal parser args to a _parse helper.
2013-11-14 23:31:20 +01:00
Thomas Adamcik
6bddcb7875 commands: Add help_formatter() with tests. 2013-11-14 23:31:20 +01:00
Thomas Adamcik
88bc046605 commands: Make sure parser errors get translated to correct error type. 2013-11-14 23:31:20 +01:00
Thomas Adamcik
fa7eee3bdf commands: Add basic format usage helper 2013-11-14 23:31:20 +01:00
Thomas Adamcik
754865d8b6 commands: Set child names upon adding them 2013-11-14 23:31:20 +01:00
Thomas Adamcik
7c82485a07 commands: Start adding commands util helper.
This class is intended to be used to contruct a tree of sub-commands. In this
intial version it mainly focuses on exposing `add_argument` to allow for nested
parsers. Next step is to start adding better `--help` that shows the entire tree
and hooking it up to select what code path to really run.
2013-11-14 23:31:20 +01:00
Stein Magnus Jodal
d723db8f41 Merge pull request #573 from adamcik/feature/avahi
Cleaned up version of #558 - Add avahi publishing of MPD and HTTP server endpoints.
2013-11-11 13:35:43 -08:00
Thomas Adamcik
f03c049485 avahi: More review comments and some other fixes.
- Switched to newstyle class
- Switched to safe values in kwargs
2013-11-11 22:04:13 +01:00
Thomas Adamcik
e9c2816354 avahi: Add hostname and port template values to names 2013-11-11 21:39:14 +01:00
Thomas Adamcik
fb31193ed0 avahi: Fixes from review comments 2013-11-11 21:26:11 +01:00
Thomas Adamcik
6c6932c374 avahi: Only convert single string at a time in helper 2013-11-11 21:16:05 +01:00