Hi,

I have a headache because of the new script. apispec.py. Site parameter behaves very strange.
My intention was to give an optional site parameter to __init__ in class Blocks. If it is not given explicitely, a getSite() has to be run.

Now, my bot's home wiki is huwiki. It has in this moment 2 blocks that will expire in 1 day (one of them expires by the time you read this, unfortunately, but is important, and according to my experiences it will be displayed today until midnight).
Data for block #37947
Blocked user:       n/a (autoblock)
Admin:              Pagony (#121148)
Beginning in UTC:   2012-02-04 16:04:22
Expiry in UTC:      2012-02-05 16:04:22
Flags:              automatic, nocreate
Reason:             Az általad használt IP-cím [[Wikipédia:Autoblokk|autoblokkolva]] van, mivel korábban a blokkolt "[[User:Magyarihun|Magyarihun]]" használta. (Magyarihun blokkolásának indoklása: "'''blokk kijátszása'''") Ha nem te vagy Magyarihun, lépj

Data for block #37940
Blocked user:       89.149.56.249
Admin:              Malatinszky (#55605)
Beginning in UTC:   2012-02-02 14:47:29
Expiry in UTC:      2012-02-06 06:47:29
Flags:              anononly, nocreate, allowusertalk
Reason:


I run the attached sample code. It is very short.
Now, if I leave the parentheses of getSite empty or I write ('hu'), it works well. For many other codes such as 'fr', 'de', 'ar' it works well, too, and gives the appropriate list of blocks expiring within 24 hours from that wiki.
But! If I write ('en'), the result is the appropriate list from enwiki PLUS the two Hungarian blocks at the end.
Writing 'ru' is even stranger, because it returns the blocks from ruwiki plus only the second one of the huwiki's blocks at the end (the first one is not even inside the list, I checked).

If I omit detecting and passing site, and give the code directly in the beginning of apispec.py, the result is the same.
Where is the error?

TIA,
--
Bináris