|
Bugzilla – Full Text Bug Listing |
| Summary: | Make new Language module more error-resistant | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 10.2 | Reporter: | Lukas Ocilka <locilka> |
| Component: | YaST2 | Assignee: | Jiří Suchomel <jsuchome> |
| Status: | RESOLVED INVALID | QA Contact: | Jiri Srain <jsrain> |
| Severity: | Enhancement | ||
| Priority: | P5 - None | CC: | andreas.hanke |
| Version: | Alpha 4 | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | Other | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: | y2log.gz | ||
|
Description
Lukas Ocilka
2006-09-13 09:53:51 UTC
Created attachment 98557 [details]
y2log.gz
You have to use correct yast2-country package. I assume you got the empty map as a result anyway, not nil. You cannot assume that everything is OK when loading data from SCR, it rather seems that the module internally expects that everything goes all right. On the other hand, if you don't care, just ignore it. --- this --- Language.ycp:144 Argument (/* any -> list <string> */SCR::Read (.target.dir, languages_directory, [])) to foreach(...) is nil is incorrect code, but if you don't care, I don't either... > seems that the module internally expects that everything goes all right
Not really. Did you get wrong result from your function?
The module just expects it is correctly installed, which is quite ususal expectation, I think. And even if you break your /usr/share/YaST2/data/languages directory manually, the function doesn't return wrong result.
It's always a matter of opinion :) ;)
I'd say that if part of code reports "Argument ... to foreach(...) is nil", then it is a mistake, that this exception is not handled before. It doesn't matter than the function than returns correct data.
The correct could be:
... = (...) SCR::Read() / SCR::Dir();
if (... == nil) y2error ("some error message");
else ...
|