import qualified TSN.XML.Injuries as Injuries ( Listing )
import qualified TSN.XML.InjuriesDetail as InjuriesDetail ( PlayerListing )
import qualified TSN.XML.News as News ( Message )
+import qualified TSN.XML.Odds as Odds ( Message )
import Xml ( DtdName(..), parse_opts )
| dtd == "newsxml.dtd" =
dbimport (undefined :: News.Message)
+ | dtd == "Odds_XML.dtd" = undefined
+
| otherwise = \_ -> do -- Dummy arg simplifies the other cases.
let infomsg =
"Unrecognized DTD in " ++ path ++ ": " ++ dtd ++ "."
report_info $ "Removed processed file " ++ path ++ "."
-- | Try to remove @path@ and potentially try again.
- kill try_again path = do
+ kill try_again path =
(remove_and_report path) `catchIOError` exception_handler
where
-- | A wrapper around threadDelay which takes seconds instead of
report_error (show e)
report_error $ "Failed to remove imported file " ++ path ++ "."
if try_again then do
- report_info $ "Waiting 5 seconds to attempt removal again..."
+ report_info "Waiting 5 seconds to attempt removal again..."
thread_sleep 5
kill False path
else