3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-24 03:29:28 +01:00
Commit Graph

44 Commits

Author SHA1 Message Date
James Lu
dac0d5b234 core: Properly track whether we should actually remove the PID file
Previously, PyLink spuriously removed PID files even if -n/--no-check-pid was set or if PID file checking caused PyLink to quit

(cherry picked from commit 91659ea992)
2017-07-20 21:33:17 +08:00
James Lu
998beb51b5 control: move plugin shutdown & pidfile cleanup routines to atexit
It is possible for PyLink to shutdown indirectly by disconnecting all networks. In these cases, the shutdown routines never ran at all...
2017-05-12 19:13:02 -07:00
James Lu
657ed82958 launcher: catch all errors when loading plugins, not just ImportError / OSError 2017-03-27 15:09:27 -07:00
James Lu
f6d9765f87 core: implement module loading from user-defined directories
Closes #350.
2017-03-08 22:31:57 -08:00
James Lu
231fd13429 launcher: disable pid check by default
I'm postponing this until PyLink 2.0 to make migration from 1.0.x to 1.1 less of a nuisance.

Closes #364.
2016-12-16 20:55:09 -08:00
James Lu
a2e0bb19dc launcher: set terminal title on launch (windows & posix) 2016-12-09 18:10:47 -08:00
James Lu
b3387f2d41 conf: fix deprecation warnings crashing because log is unavailable
This allows conf methods to access to global logger by via an optional 'logger' argument. However,
the caveat is that the logging facilities are still unavailable on first start, because log can
only be imported *after* the configuration is loaded.
2016-12-05 22:43:01 -08:00
James Lu
57f7acc124 pylink: fix last commit (args.no_check_pid) 2016-11-16 21:52:07 -08:00
James Lu
7c93a6cdfc pylink: tidy up --no-check-pid setting 2016-11-14 21:38:02 -08:00
James Lu
c4e0923fb5 pylink: add a migration note for pid checking 2016-10-15 14:34:21 -07:00
James Lu
774f30c940 pylink: exit with a non-zero code if pid check fails; reword error to be more helpful 2016-10-15 14:23:29 -07:00
Ken Spencer
a30942669a pylink: Stop daemon if pid file exists and we're checking 2016-10-15 16:43:14 -04:00
Ken Spencer
aaadb63137 Add PID file checking 2016-10-15 16:09:35 -04:00
James Lu
556b388a4e core: Rehashable permissions; import coremods on start 2016-08-25 12:07:55 -07:00
James Lu
a04bf6119e launcher: show VCS version in "pylink -v" 2016-08-23 07:28:48 -07:00
James Lu
85e786904c pylink: show a better error if the protocol module is missing 2016-07-28 21:33:13 -07:00
James Lu
357e8327c4 pylink: less ambiguous error when module isn't installed 2016-07-21 00:02:37 -07:00
James Lu
fab61729b9 conf: throw a specific error when PyYAML is missing 2016-07-19 17:47:39 -07:00
James Lu
72c48502c6 Generate __init__.py with package version on runtime
Closes #259. This removes world.version and replaces it with pylinkirc.__version__ where the former was used.
2016-07-03 00:26:03 -07:00
James Lu
bcc84b8618 core: remove references to plugins/protocols_folder (#259) 2016-07-02 23:58:21 -07:00
James Lu
be19f88e86 pylink, world: default tests mode to False, simplify imports 2016-06-23 22:51:40 -07:00
James Lu
377c09fe66 pylink: oops, re-add world.testing = False 2016-06-22 19:23:06 -07:00
James Lu
3a57e8d595 Split coreplugin.py into coremods/
Closes #240.
2016-06-21 11:25:47 -07:00
James Lu
75ae50e03a pylink: implement --version, --no-pid
Closes #242.
2016-06-21 11:03:28 -07:00
James Lu
2f188dc60d core: Remove load-conf-on-import, implement basic command line options via argparse
Ref #242.
2016-06-21 10:55:42 -07:00
James Lu
d0bd064eda pylink: better error message if PyLink isn't properly installed 2016-06-21 10:27:36 -07:00
James Lu
481d70eff8 New import paths for properly installed pylinkirc 2016-06-20 18:18:54 -07:00
James Lu
201ae8b5fd pylink: remove call to coreplugin.main() 2016-04-30 16:44:27 -07:00
James Lu
1bcadbe12b Use more flexible shebangs (/usr/bin/env python3) 2016-04-01 18:22:02 -07:00
James Lu
cf363432f0 pylink: use abspath() to get the source directory
Ref #181: Fixes crash on start when PyLink is run without the current
directory being specified: e.g. "python pylink" instead of "python
./pylink"
2016-03-27 21:24:55 -07:00
James Lu
4125ff33b1 pylink: prettier "Loaded plugins" log message on start 2016-03-26 16:29:17 -07:00
James Lu
71e6319b70 pylink: don't crash if plugin is missing 2016-01-03 21:05:45 -08:00
James Lu
bd8aa4dc11 pylink: more consistent logging syntax 2015-12-24 18:08:00 -08:00
James Lu
9a81a2ba1f Rename utils.getProtoModule => utils.getProtocolModule 2015-12-24 17:33:49 -08:00
James Lu
197532c1be core: Replace imp (deprecated) with importlib, reword some docs & remove unneeded imports 2015-11-22 20:14:47 -08:00
James Lu
2080a39cf4 coreplugin: sanity check: make sure irc.connected is set after 2 seconds & mention how setting this is neccessary in docs 2015-11-15 21:50:23 -08:00
James Lu
e84a2d1025 Modularize our import hacks, make Irc() take a conf object again 2015-09-28 19:12:45 -07:00
James Lu
630aa83084 core: add some rudimentary config file validation 2015-09-28 11:55:31 -07:00
James Lu
38a350a5f8 Revert "pylink: use sys.path instead of imp library hacks"
This reverts commit cf2ba4b492.
2015-09-27 12:11:59 -07:00
James Lu
cf2ba4b492 pylink: use sys.path instead of imp library hacks 2015-09-27 10:44:52 -07:00
James Lu
a903f97507 Make world.plugins a dict instead of a list 2015-09-27 10:27:32 -07:00
James Lu
3c8da4934a pylink: always chdir to the PyLink root directory 2015-09-19 11:55:22 -07:00
James Lu
0f26848b16 Add a useful "version" command 2015-09-19 11:51:56 -07:00
James Lu
f6a4503372 Use a more unique main executable name... 2015-09-04 18:20:46 -07:00