Commit graph

492 commits

Author SHA1 Message Date
Alexandre Aubin
d0c569eead More cleaning up, test fixing 2021-06-13 18:51:13 +02:00
Alexandre Aubin
e2cb8cdfab Merge branch 'dev' into rework-authenticator-system 2021-06-13 15:34:22 +02:00
ljf
2c9ec9f638 [fix] Damn array args bug 2021-06-03 18:01:43 +02:00
Alexandre Aubin
5e1ed4c331
Merge pull request #275 from YunoHost/free-the-cpu
wait 1s for message in call_async_output
2021-05-27 16:47:34 +02:00
ljf (zamentur)
f91fad08da
[fix] Request params not decoded 2021-05-25 13:35:04 +02:00
ljf (zamentur)
d9789364b4
[fix] Unicode password doesn't log in 2021-05-17 12:18:51 +02:00
Kayou
04b7f7bc6f
wait 1s for message in call_async_output 2021-05-13 23:28:52 +02:00
Alexandre Aubin
135fae95a8 For some reason yunohost-api don't want to start due to recent changes in actionamp, apply this trick for subcategories just like we do for categories 2021-04-16 00:06:42 +02:00
Alexandre Aubin
e22aac9af0 Black 2021-03-23 00:24:33 +01:00
Alexandre Aubin
b17a6fa627 Attempt to fix test: handle argparse errors as validation errors 2021-03-23 00:12:15 +01:00
Alexandre Aubin
bc1bdbb247 Introduce validation errors, authentication errors, corresponding http codes 2021-03-12 03:55:52 +01:00
Alexandre Aubin
f790bde101 We don't need these wrapper classes, just call HTTPResponse directly 2021-03-12 03:14:34 +01:00
Alexandre Aubin
af0957c028 Rework and externalize the authenticator system 2021-03-09 05:43:09 +01:00
Kay0u
affb54f84d
fix tests 2021-03-01 10:45:50 +01:00
Alexandre Aubin
cafe68f30e Move LogPipe directly into process.py, we don't need to split that stuff on different files 2021-02-28 21:20:42 +01:00
Alexandre Aubin
e85b9f71d5 Handle the actual logging from the parent process, otherwise we run into a shitload of complex issues to interact with the websocket 2021-02-28 21:18:25 +01:00
Alexandre Aubin
9670357f98 No need to display this message 2021-02-28 16:58:50 +01:00
Alexandre Aubin
16c43a67f7 Only report missing/failed translation as a warning, no need to report as exception... 2021-02-28 16:54:54 +01:00
Alexandre Aubin
cde45de0ba Add m18n helper to check that a key exist 2021-02-28 16:54:19 +01:00
Alexandre Aubin
bdd048197d Misc logging fixes 2021-01-31 16:14:06 +01:00
Alexandre Aubin
e7a01c68f5 Revert "[mod] unify all subloggers under moulinette.core"
This reverts commit c88f127b8c691c6121229402be4375fdc62ed6bf.
2021-01-31 16:14:06 +01:00
Laurent Peuch
9a35d77a08 [mod] better error message 2021-01-31 16:14:06 +01:00
Laurent Peuch
10576f7138 [mod] unify all subloggers under moulinette.core 2021-01-31 16:14:06 +01:00
Alexandre Aubin
cf98095303
Merge pull request #269 from YunoHost/fix-argparse
Fix argparse
2021-01-31 14:41:11 +01:00
Kayou
90f894b541
Do not encode strings for plain output 2021-01-30 11:13:53 +01:00
Kay0u
53cbca2c1e
Add test without action 2021-01-26 21:19:26 +01:00
Kay0u
1a95e6e779
Merge branch 'dev' into fix-argparse 2021-01-26 21:04:39 +01:00
Kay0u
63ae3b677f
remove stdinfo 2021-01-26 16:38:36 +01:00
Kay0u
84d250c1c2
monkey patch _get_action_name 2021-01-26 12:05:25 +01:00
Kay0u
9077569c22
in python3 OrderedDict and array are not the same 2021-01-26 12:05:05 +01:00
Kayou
48d14f34d2
remove unused exception var 2021-01-25 23:24:24 +01:00
Kay0u
ce3971093d
call_async_output: we can't use stdinfo in kwargs, close stdout, stderr and stdinfo if subprocess.Popen raise an exception 2021-01-25 18:53:33 +01:00
Kay0u
c1c34c11e2
format code 2021-01-25 18:50:05 +01:00
Alexandre Aubin
ae4087d522
Merge pull request #257 from YunoHost/return-additional-error-data-to-api
Support more complex errors (be able to return additional data in a json structure)
2021-01-23 16:05:45 +01:00
Alexandre Aubin
0de154678c Black again, with the right version this time.. 2021-01-20 05:59:24 +01:00
Alexandre Aubin
677efcf6d6 Black? 2021-01-20 05:46:05 +01:00
Alexandre Aubin
570e53234a Drop support for python2 2021-01-20 05:35:35 +01:00
Alexandre Aubin
8105718705
Merge branch 'dev' into enh-python3 2021-01-19 23:04:25 +01:00
Alexandre Aubin
755a475e5d We don't really care that there's 'nothing to update in ldap' 2021-01-13 02:30:39 +01:00
Kay0u
9236727561
Fix https://github.com/YunoHost/yunohost/pull/1075#discussion_r551045491 2021-01-06 01:29:33 +01:00
Laurent Peuch
f9454da5e7 [mod] trash this UX madness that is error_see_logs and improve error messages 2021-01-01 15:24:49 +01:00
Alexandre Aubin
84f17f7830 Rework / simplify the whole story of call_async_output that was a complete mess and broken by Python 3 for some reason. New code should be much more simple and fix the synchronization between debug, info, warnings, and probably also more performant overall ? 2021-01-01 04:00:57 +01:00
Alexandre Aubin
d0b43f0e4a Merge branch 'dev' into enh-python3 2020-12-31 23:46:05 +01:00
Alexandre Aubin
0d58eff6a2 Misc encoding fixes 2020-12-31 23:45:48 +01:00
Laurent Peuch
2caf1234e8 [fix] no catchall exception 2020-12-31 23:44:23 +01:00
Laurent Peuch
8566eaaa1f [mod] don't use catchall exceptions episode 2 2020-12-31 13:25:05 +01:00
Laurent Peuch
82bc0e829a [mod] don't use catchall exceptions 2020-12-31 12:30:57 +01:00
Alexandre Aubin
c7ba45596c
Merge pull request #259 from YunoHost/format-code
format
2020-12-30 22:27:31 +01:00
Kay0u
c1669174c3
add options to write_to_json 2020-12-11 15:08:31 +01:00
Kay0u
b06a117c18
Remove unused exception 2020-12-04 22:21:08 +01:00
Kay0u
1d73dac969
fix tests 2020-12-04 22:16:32 +01:00
Kay0u
bd27799283
Merge remote-tracking branch 'origin/dev' into enh-python3 2020-12-04 22:15:36 +01:00
Kay0u
b31e2b026e
format 2020-12-04 16:38:12 +01:00
Alexandre Aubin
dfb88418f1 Support more complex errors (be able to return additional data in a json structure) 2020-11-22 02:18:22 +01:00
Alexandre Aubin
f01466d6ef Always strip() the output of check_output 2020-10-31 18:53:40 +01:00
Alexandre Aubin
923e394d0b Allow python functions to return a raw HTTPResponse 2020-09-06 21:24:50 +02:00
Alexandre Aubin
5feddfa93a Merge branch 'dev' into 4.1 2020-09-05 18:43:30 +02:00
Alexandre Aubin
2501ecda56 Ugly hack to have the name of the main logger, otherwise error/exception messages ain't displayed 2020-08-27 19:21:48 +02:00
Kayou
be6ff8e12a
code format 2020-08-21 17:21:49 +02:00
Alexandre Aubin
d9fa6c7858 Fix api18n : it should return a wrapper and not the callback directly. Current code led to some weird incorrect locale sometimes 2020-08-21 16:40:19 +02:00
Alexandre Aubin
4635c555d8
Merge pull request #245 from YunoHost/simplify-interface-init
Simplify interface initialization + ugly optimization hack to speed up parser building
2020-08-14 15:39:31 +02:00
Alexandre Aubin
024cadf426 Get rid of legacy code which breaks postinstall on buster for some reason 2020-07-27 20:24:30 +02:00
Alexandre Aubin
7818f07ed1 Update authorship/maintainer information 2020-05-26 23:53:02 +02:00
Kay0u
7fed0e5051
fix linter 2020-05-12 19:13:37 +02:00
Alexandre Aubin
f967bed370 Locale lib sometimes miserably fails to parse locale ~.~ 2020-05-12 18:03:59 +02:00
Alexandre Aubin
51bb878f15
Merge pull request #247 from YunoHost/auto-restart-ldap
[fix] try to autorestart ldap when the server is down
2020-05-07 22:13:47 +02:00
Bram
f2e9f26e52
Update moulinette/authenticators/ldap.py
Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
2020-05-07 21:53:38 +02:00
Alexandre Aubin
095105685a
Merge pull request #244 from YunoHost/less-spooky-message-for-expired-session
Less spooky messages when session expired
2020-05-07 19:51:09 +02:00
Alexandre Aubin
01e064b642 Typo :| 2020-05-07 19:33:27 +02:00
Alexandre Aubin
840f27d2fb Print the goddamn traceback 2020-05-07 00:34:36 +02:00
Alexandre Aubin
d946ee92a9
Merge pull request #243 from YunoHost/handle-stupid-cookie-cache-issue
try/catch around request.get_cookie to catch stupid CookieError
2020-05-07 00:10:40 +02:00
Laurent Peuch
b97ac05aad [fix] try to autorestart ldap when the server is down 2020-05-04 14:00:03 +02:00
Kay0u
708b0330d2
black/flake8 2020-05-01 14:03:26 +02:00
Kay0u
e8309384e5
fix tests 2020-05-01 14:00:10 +02:00
Alexandre Aubin
677f4518e4 Ugly hack to only load 1 category to speed up execution time 2020-05-01 05:43:32 +02:00
Alexandre Aubin
89ad543797 Tweaking debug messages 2020-05-01 04:33:14 +02:00
Alexandre Aubin
559f40a4ea Another round of simplification for interface init... 2020-05-01 03:58:37 +02:00
Alexandre Aubin
c750226a3b We don't need no namespaces ... but let's it customizable through a var env if needed... 2020-05-01 03:48:01 +02:00
Alexandre Aubin
1849d1aa3b Simplify(?) ActionsMap initialization by removing some obscure kwargs handling 2020-05-01 03:07:25 +02:00
Alexandre Aubin
57d1b2b6db Bit of tidying up 2020-05-01 02:44:15 +02:00
Alexandre Aubin
d2f68cb536 We don't need to auth in CLI 2020-05-01 02:44:15 +02:00
Alexandre Aubin
a34fb7c665 We don't need to be able to auth in cli 2020-05-01 02:44:15 +02:00
Alexandre Aubin
fce96ad48f We don't need to be able to not use the cache... 2020-05-01 02:44:13 +02:00
Alexandre Aubin
b6258de2db We don't need to be able to disable websocket 2020-05-01 02:43:25 +02:00
Alexandre Aubin
eb6d56f7ab Simplify(?) interface initialization 2020-05-01 02:43:11 +02:00
Alexandre Aubin
b42ed7be7a Less spooky messages when session expired 2020-04-30 17:59:47 +02:00
Alexandre Aubin
1049a28d6a
Computer ain't happy because *SPAECIZE* 2020-04-25 17:29:27 +02:00
Alexandre Aubin
0033c6f0ec
try/catch around request.get_cookie to catch stupid CookieError 2020-04-25 17:17:45 +02:00
Alexandre Aubin
6f1133b205 The hell with 'pythonic try/except' ... Just use a goddamn if/else for that kind of stuff 2020-04-23 04:26:00 +02:00
Kay0u
0f37a70f27
Fix tests 2020-04-10 00:12:19 +02:00
Alexandre Aubin
628ffc9da1 Report the actual error when ldap fails 2020-04-09 19:05:20 +02:00
Alexandre Aubin
3a3ce804d6 Wat da fuke pytz 2020-04-02 23:44:15 +02:00
Alexandre Aubin
6e5b389e71
Merge branch 'stretch-unstable' into enh-python3 2020-04-01 19:41:11 +02:00
Alexandre Aubin
d1ea1b606f
Merge pull request #226 from frju365/patch-1
[fix] Return nothing if argument is already set.
2020-04-01 19:30:38 +02:00
Kay0u
d4ecac199d admincn -> admindn 2020-04-01 18:35:21 +02:00
Kayou
c6806af2ee Fix postinstall 2020-04-01 18:35:21 +02:00
Kay0u
cba7c7e209
Fix format 2020-03-30 23:08:12 +02:00
Kay0u
85d48ae07d
Merge branch 'stretch-unstable' into moar-tests 2020-03-30 23:04:19 +02:00
Kay0u
a10b40ed8d
Remove _encode_dict 2020-03-30 22:56:22 +02:00
Kay0u
f6e92d84b8
avoid hardcoded values in ldap 2020-03-29 01:28:09 +01:00